Rely on SPM plugins to consume SwiftLint and SwiftFormat

Use their latest releases and fix some violations and issues.

# Conflicts:
#	.github/workflows/linting.yml
#	.github/workflows/testing.yml
This commit is contained in:
Danny Mösch 2024-11-24 13:14:38 +01:00
parent 358908f161
commit 1bdf9d684b
40 changed files with 126 additions and 186 deletions

View file

@ -13,7 +13,7 @@ class AboutRepositoryTableViewController: BasicStaticTableViewController {
private static let VALUE_NOT_AVAILABLE = "ValueNotAvailable".localize()
private var needRefresh = false
private var indicator: UIActivityIndicatorView = .init(style: .medium)
private var indicator = UIActivityIndicatorView(style: .medium)
private let passwordStore = PasswordStore.shared

View file

@ -38,11 +38,6 @@ class BasicStaticTableViewController: UITableViewController, MFMailComposeViewCo
tableData[section].count
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
override func tableView(_: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cellData = tableData[indexPath.section][indexPath.row]
let cellDataStyle = cellData[CellDataKey.style] as? CellDataStyle

View file

@ -24,13 +24,13 @@ protocol KeyImporter {
extension KeyImporter {
static var isCurrentKeySource: Bool {
Defaults.gitSSHKeySource == Self.keySource
Defaults.gitSSHKeySource == keySource
}
static var menuLabel: String {
if isCurrentKeySource {
return "\(Self.label)"
return "\(label)"
}
return Self.label
return label
}
}

View file

@ -16,6 +16,7 @@ class PGPKeyFileImportTableViewController: AutoCellHeightUITableViewController,
private var privateKey: String?
private enum KeyType { case none, `private`, `public` }
private var currentlyPicking = KeyType.none
@IBAction

View file

@ -14,7 +14,7 @@ protocol PGPKeyImporter: KeyImporter {
extension PGPKeyImporter {
static var isCurrentKeySource: Bool {
Defaults.pgpKeySource == Self.keySource
Defaults.pgpKeySource == keySource
}
func doAfterImport() {}

View file

@ -30,7 +30,7 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
// preserve path so it can be reloaded even if the passwordEntity is deleted during the update process
private var passwordPath: String?
private lazy var editUIBarButtonItem: UIBarButtonItem = .init(barButtonSystemItem: .edit, target: self, action: #selector(pressEdit))
private lazy var editUIBarButtonItem = UIBarButtonItem(barButtonSystemItem: .edit, target: self, action: #selector(pressEdit))
private struct TableSection {
var type: PasswordDetailTableViewControllerSectionType