diff --git a/.swiftlint.yml b/.swiftlint.yml index 779be99..b2b1cc9 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -86,7 +86,7 @@ whitelist_rules: - legacy_constant - legacy_constructor - legacy_hashing -# - legacy_multiple + - legacy_multiple - legacy_nsgeometry_functions - legacy_random # - let_var_whitespace diff --git a/passKit/Passwords/PasswordGenerator.swift b/passKit/Passwords/PasswordGenerator.swift index 51b4d7e..8b812d0 100644 --- a/passKit/Passwords/PasswordGenerator.swift +++ b/passKit/Passwords/PasswordGenerator.swift @@ -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 {