Enable SwiftLint rule 'legacy_multiple' and fix all violations
This commit is contained in:
parent
fb01d6bdf9
commit
c290ebe427
2 changed files with 2 additions and 2 deletions
|
|
@ -86,7 +86,7 @@ whitelist_rules:
|
|||
- legacy_constant
|
||||
- legacy_constructor
|
||||
- legacy_hashing
|
||||
# - legacy_multiple
|
||||
- legacy_multiple
|
||||
- legacy_nsgeometry_functions
|
||||
- legacy_random
|
||||
# - let_var_whitespace
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue