Enable SwiftLint rule 'overridden_super_call' and fix all violations

This commit is contained in:
Danny Moesch 2020-07-06 10:04:41 +02:00 committed by Mingshen Sun
parent e1cb280d4a
commit 5270c92b76
4 changed files with 5 additions and 3 deletions

View file

@ -120,7 +120,7 @@ whitelist_rules:
- operator_whitespace - operator_whitespace
- optional_enum_case_matching - optional_enum_case_matching
- orphaned_doc_comment - orphaned_doc_comment
# - overridden_super_call - overridden_super_call
- override_in_extension - override_in_extension
- pattern_matching_keywords - pattern_matching_keywords
- prefer_self_type_over_type_of_self - prefer_self_type_over_type_of_self

View file

@ -77,7 +77,7 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
} }
override func viewDidAppear(_ animated: Bool) { override func viewDidAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewDidAppear(animated)
if shouldPopCurrentView { if shouldPopCurrentView {
let alert = UIAlertController(title: "Notice".localize(), message: "PreviousChangesDiscarded.".localize(), preferredStyle: UIAlertController.Style.alert) let alert = UIAlertController(title: "Notice".localize(), message: "PreviousChangesDiscarded.".localize(), preferredStyle: UIAlertController.Style.alert)
alert.addAction(UIAlertAction.okAndPopView(controller: self)) alert.addAction(UIAlertAction.okAndPopView(controller: self))

View file

@ -326,7 +326,8 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
tableView.refreshControl = passwordStore.repositoryExists() ? syncControl : nil tableView.refreshControl = passwordStore.repositoryExists() ? syncControl : nil
} }
override func viewWillDisappear(_: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
// Remove gesture recognizer from navigation bar when view is about to disappear // Remove gesture recognizer from navigation bar when view is about to disappear
navigationController?.navigationBar.removeGestureRecognizer(tapNavigationBarGestureRecognizer) navigationController?.navigationBar.removeGestureRecognizer(tapNavigationBarGestureRecognizer)
} }

View file

@ -10,6 +10,7 @@ import UIKit
class SettingsSplitViewController: UISplitViewController, UISplitViewControllerDelegate { class SettingsSplitViewController: UISplitViewController, UISplitViewControllerDelegate {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad()
delegate = self delegate = self
preferredDisplayMode = .allVisible preferredDisplayMode = .allVisible
} }