Enable SwiftLint rule 'conditional_returns_on_newline' and fix all violations
This commit is contained in:
parent
fdca54a0ab
commit
08473f8f05
3 changed files with 16 additions and 6 deletions
|
|
@ -20,7 +20,7 @@ whitelist_rules:
|
|||
- colon
|
||||
- comma
|
||||
- compiler_protocol_init
|
||||
# - conditional_returns_on_newline
|
||||
- conditional_returns_on_newline
|
||||
- contains_over_filter_count
|
||||
- contains_over_filter_is_empty
|
||||
# - contains_over_first_not_nil
|
||||
|
|
|
|||
|
|
@ -283,8 +283,12 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
|||
func didTapNavigationBar(_ sender: UITapGestureRecognizer) {
|
||||
let location = sender.location(in: navigationController?.navigationBar)
|
||||
let hitView = navigationController?.navigationBar.hitTest(location, with: nil)
|
||||
guard !(hitView is UIControl) else { return }
|
||||
guard passwordStore.numberOfLocalCommits != 0 else { return }
|
||||
guard !(hitView is UIControl) else {
|
||||
return
|
||||
}
|
||||
guard passwordStore.numberOfLocalCommits != 0 else {
|
||||
return
|
||||
}
|
||||
|
||||
let ac = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
|
||||
let allAction = UIAlertAction(title: "All Passwords", style: .default) { _ in
|
||||
|
|
@ -405,7 +409,9 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
|||
|
||||
@objc
|
||||
func backAction(_: Any?) {
|
||||
guard Defaults.isShowFolderOn else { return }
|
||||
guard Defaults.isShowFolderOn else {
|
||||
return
|
||||
}
|
||||
var anim: CATransition? = transitionFromLeft
|
||||
if parentPasswordEntity == nil {
|
||||
anim = nil
|
||||
|
|
@ -640,7 +646,9 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
|||
@objc
|
||||
func actOnReloadTableViewRelatedNotification() {
|
||||
DispatchQueue.main.async { [weak weakSelf = self] in
|
||||
guard let strongSelf = weakSelf else { return }
|
||||
guard let strongSelf = weakSelf else {
|
||||
return
|
||||
}
|
||||
// Reset selectedScopeButtonIndex to make sure the correct reloadTableView
|
||||
strongSelf.searchController.searchBar.selectedScopeButtonIndex = 0
|
||||
strongSelf.initPasswordsTableEntries(parent: nil)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@ open class PasscodeLockPresenter {
|
|||
}
|
||||
|
||||
open func present(windowLevel: CGFloat?) {
|
||||
guard PasscodeLock.shared.hasPasscode else { return }
|
||||
guard PasscodeLock.shared.hasPasscode else {
|
||||
return
|
||||
}
|
||||
|
||||
// dismiss the original window
|
||||
dismiss()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue