Enable SwiftLint rule 'legacy_multiple' and fix all violations

This commit is contained in:
Danny Moesch 2020-07-04 23:36:27 +02:00 committed by Mingshen Sun
parent fb01d6bdf9
commit c290ebe427
2 changed files with 2 additions and 2 deletions

View file

@ -86,7 +86,7 @@ whitelist_rules:
- legacy_constant
- legacy_constructor
- legacy_hashing
# - legacy_multiple
- legacy_multiple
- legacy_nsgeometry_functions
- legacy_random
# - let_var_whitespace

View file

@ -76,7 +76,7 @@ public struct PasswordGenerator: Codable {
guard flavor == .random, groups > 0, groups < length else {
return false
}
return (length + 1) % groups == 0
return (length + 1).isMultiple(of: groups)
}
private func generateRandom() -> String {