Enable SwiftLint rule 'multiline_literal_brackets' and fix all violations

This commit is contained in:
Danny Moesch 2020-07-05 00:25:34 +02:00 committed by Mingshen Sun
parent 776c813f94
commit 55e2cd7939
6 changed files with 78 additions and 46 deletions

View file

@ -61,12 +61,14 @@ class AboutRepositoryTableViewController: BasicStaticTableViewController {
let type = UITableViewCell.AccessoryType.none
strongSelf.tableData = [
// section 0
[[.style: CellDataStyle.value1, .accessoryType: type, .title: "Passwords".localize(), .detailText: passwords],
[.style: CellDataStyle.value1, .accessoryType: type, .title: "Size".localize(), .detailText: size],
[.style: CellDataStyle.value1, .accessoryType: type, .title: "LocalCommits".localize(), .detailText: localCommits],
[.style: CellDataStyle.value1, .accessoryType: type, .title: "LastSynced".localize(), .detailText: lastSynced],
[.style: CellDataStyle.value1, .accessoryType: type, .title: "Commits".localize(), .detailText: commits],
[.title: "CommitLogs".localize(), .action: "segue", .link: "showCommitLogsSegue"]],
[
[.style: CellDataStyle.value1, .accessoryType: type, .title: "Passwords".localize(), .detailText: passwords],
[.style: CellDataStyle.value1, .accessoryType: type, .title: "Size".localize(), .detailText: size],
[.style: CellDataStyle.value1, .accessoryType: type, .title: "LocalCommits".localize(), .detailText: localCommits],
[.style: CellDataStyle.value1, .accessoryType: type, .title: "LastSynced".localize(), .detailText: lastSynced],
[.style: CellDataStyle.value1, .accessoryType: type, .title: "Commits".localize(), .detailText: commits],
[.title: "CommitLogs".localize(), .action: "segue", .link: "showCommitLogsSegue"],
],
]
strongSelf.indicator.stopAnimating()
strongSelf.tableView.reloadData()

View file

@ -12,13 +12,17 @@ class AboutTableViewController: BasicStaticTableViewController {
override func viewDidLoad() {
tableData = [
// section 0
[[.title: "Website".localize(), .action: "link", .link: "https://github.com/mssun/pass-ios.git"],
[.title: "Help".localize(), .action: "link", .link: "https://github.com/mssun/passforios/wiki"],
[.title: "ContactDeveloper".localize(), .action: "link", .link: "mailto:developer@passforios.mssun.me?subject=Pass%20for%20iOS"]],
[
[.title: "Website".localize(), .action: "link", .link: "https://github.com/mssun/pass-ios.git"],
[.title: "Help".localize(), .action: "link", .link: "https://github.com/mssun/passforios/wiki"],
[.title: "ContactDeveloper".localize(), .action: "link", .link: "mailto:developer@passforios.mssun.me?subject=Pass%20for%20iOS"],
],
// section 1,
[[.title: "OpenSourceComponents".localize(), .action: "segue", .link: "showOpenSourceComponentsSegue"],
[.title: "SpecialThanks".localize(), .action: "segue", .link: "showSpecialThanksSegue"]],
[
[.title: "OpenSourceComponents".localize(), .action: "segue", .link: "showOpenSourceComponentsSegue"],
[.title: "SpecialThanks".localize(), .action: "segue", .link: "showSpecialThanksSegue"],
],
]
super.viewDidLoad()
}

View file

@ -11,30 +11,46 @@ import UIKit
class OpenSourceComponentsTableViewController: BasicStaticTableViewController {
private static let openSourceComponents = [
["FavIcon",
"https://github.com/bitserf/FavIcon",
"https://github.com/bitserf/FavIcon/blob/master/LICENSE"],
["GopenPGP",
"https://gopenpgp.org/",
"https://github.com/ProtonMail/gopenpgp/blob/master/LICENSE"],
["KeychainAccess",
"https://github.com/kishikawakatsumi/KeychainAccess",
"https://github.com/kishikawakatsumi/KeychainAccess/blob/master/LICENSE"],
["ObjectiveGit",
"https://github.com/libgit2/objective-git",
"https://github.com/libgit2/objective-git/blob/master/LICENSE"],
["OneTimePassword",
"https://github.com/mattrubin/OneTimePassword",
"https://github.com/mattrubin/OneTimePassword/blob/develop/LICENSE.md"],
["SVProgressHUD",
"https://github.com/SVProgressHUD/SVProgressHUD",
"https://github.com/SVProgressHUD/SVProgressHUD/blob/master/LICENSE"],
["SwiftyUserDefaults",
"https://github.com/radex/SwiftyUserDefaults",
"https://github.com/radex/SwiftyUserDefaults/blob/master/LICENSE"],
["EFF's Wordlists",
"https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases",
"http://creativecommons.org/licenses/by/3.0"],
[
"FavIcon",
"https://github.com/bitserf/FavIcon",
"https://github.com/bitserf/FavIcon/blob/master/LICENSE",
],
[
"GopenPGP",
"https://gopenpgp.org/",
"https://github.com/ProtonMail/gopenpgp/blob/master/LICENSE",
],
[
"KeychainAccess",
"https://github.com/kishikawakatsumi/KeychainAccess",
"https://github.com/kishikawakatsumi/KeychainAccess/blob/master/LICENSE",
],
[
"ObjectiveGit",
"https://github.com/libgit2/objective-git",
"https://github.com/libgit2/objective-git/blob/master/LICENSE",
],
[
"OneTimePassword",
"https://github.com/mattrubin/OneTimePassword",
"https://github.com/mattrubin/OneTimePassword/blob/develop/LICENSE.md",
],
[
"SVProgressHUD",
"https://github.com/SVProgressHUD/SVProgressHUD",
"https://github.com/SVProgressHUD/SVProgressHUD/blob/master/LICENSE",
],
[
"SwiftyUserDefaults",
"https://github.com/radex/SwiftyUserDefaults",
"https://github.com/radex/SwiftyUserDefaults/blob/master/LICENSE",
],
[
"EFF's Wordlists",
"https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases",
"http://creativecommons.org/licenses/by/3.0",
],
]
override func viewDidLoad() {

View file

@ -10,14 +10,22 @@ import UIKit
class SpecialThanksTableViewController: BasicStaticTableViewController {
let openSourceComponents = [
["Contributors".localize(),
"https://github.com/mssun/passforios/graphs/contributors"],
["Password Store",
"https://passwordstore.org"],
["Icon8",
"https://icons8.com"],
["FlatIcon",
"https://www.flaticon.com"],
[
"Contributors".localize(),
"https://github.com/mssun/passforios/graphs/contributors",
],
[
"Password Store",
"https://passwordstore.org",
],
[
"Icon8",
"https://icons8.com",
],
[
"FlatIcon",
"https://www.flaticon.com",
],
]
override func viewDidLoad() {