Created
September 27, 2021 11:24
-
-
Save brindy/c0dccfff2230ec9b437b040a5d6ed215 to your computer and use it in GitHub Desktop.
swiftlint custom rules for explicit non-final classes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
custom_rules: | |
explicit_non_final_class: | |
included: ".*\\.swift" | |
excluded: ".*Tests\\.swift" | |
name: "Implicitly non-final class" | |
regex: "^\\s*(class) (?!func|var)" | |
capture_group: 0 | |
match_kinds: | |
- keyword | |
message: "Classes should be `final` by default, use explicit `internal` or `public` for non-final classes." | |
severity: error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment