Enable SwiftLint rule 'switch_case_on_newline' and fix all violations

This commit is contained in:
Danny Moesch 2020-07-05 23:10:42 +02:00 committed by Mingshen Sun
parent 79dbac4e9e
commit 1b1bd46235
3 changed files with 5 additions and 3 deletions

View file

@ -159,7 +159,7 @@ whitelist_rules:
- strong_iboutlet
- superfluous_disable_command
- switch_case_alignment
# - switch_case_on_newline
- switch_case_on_newline
- syntactic_sugar
- todo
# - toggle_bool

View file

@ -137,7 +137,8 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController {
cell.accessoryView = accessoryView
cell.selectionStyle = .none
hidePasswordImagesSwitch.isOn = Defaults.isHidePasswordImagesOn
default: break
default:
break
}
return cell
}

View file

@ -132,7 +132,8 @@ class GitRepositorySettingsTableViewController: UITableViewController {
Utils.alert(title: "CannotSave".localize(), message: "CheckEnteredUsername.".localize(), controller: self)
return
}
case "file": break
case "file":
break
default:
Utils.alert(title: "CannotSave".localize(), message: "Protocol is not supported", controller: self)
return