Skip to content

Instantly share code, notes, and snippets.

@strzempa
Created November 14, 2019 11:40
Show Gist options
  • Save strzempa/bb1996748abf49d9e22b6e59c1ff7377 to your computer and use it in GitHub Desktop.
Save strzempa/bb1996748abf49d9e22b6e59c1ff7377 to your computer and use it in GitHub Desktop.
.swiftlint.yml
disabled_rules: # rule identifiers to exclude from running
- trailing_whitespace
- function_parameter_count
- line_length
- variable_name
- cyclomatic_complexity
- nesting
- conditional_binding_cascade
- force_cast
opt_in_rules: # some rules are only opt-in
- force_unwrapping
- force_https
- empty_count
- conditional_binding_cascade
excluded: # paths to ignore during linting. Takes precedence over `included`.
- CommonComponents/Carthage
- Carthage
- Frameworks
- Packages
- Pods
included:
type_body_length:
- 700 #warning
- 1000 #error
file_length:
- 400 #warning
- 500 #error
function_body_length:
- 125 #warning
- 200 #error
type_name:
min_length: 3 # only warning
max_length: # warning and error
warning: 80
error: 120
custom_rules:
avoid_print:
included: ".*.swift"
regex: 'print\('
name: "print"
message: "Avoid using print method directly. Use logger"
severity: warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment