Skip to content

fix: swiftlint configuration file #760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 24 additions & 22 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,47 @@
excluded:
- Carthage
- Pods
- .build
- Build
- Carthage
- DerivedData
- Pods

disabled_rules:
- type_name
- function_parameter_count
- identifier_name
- line_length
- multiple_closures_with_trailing_closure
- nesting
- todo
- type_name

opt_in_rules:
- weak_delegate
- unused_import
- unneeded_parentheses_in_closure_argument
- trailing_closure
- static_operator
- redundant_nil_coalescing
- override_in_extension
- legacy_objc_type
- implicitly_unwrapped_optional
- force_unwrapping
- empty_string
- closure_body_length
- fallthrough
- indentation_width
- closure_body_length
- empty_string
- fallthrough
- force_unwrapping
- implicitly_unwrapped_optional
- indentation_width
- legacy_objc_type
- override_in_extension
- redundant_nil_coalescing
- static_operator
- trailing_closure
- unneeded_parentheses_in_closure_argument
- unused_import
- weak_delegate

# force warnings
force_cast: error
force_try: error

custom_rules:
commented_out_code:
included: ".*\\.swift" # regex that defines paths to include during linting. optional.
excluded: ".*Test(s)?\\.swift" # regex that defines paths to exclude during linting. optional
name: "Commented out code" # rule name. optional.
regex: "^\\/\\/\\s*(@|\\.?([a-z]|(\\})))" # matching pattern
included: .*\.swift # regex that defines paths to include during linting. optional.
excluded: .*Test(s)?\.swift # regex that defines paths to exclude during linting. optional
name: Commented out code # rule name. optional.
regex: ^\s*(\/\/(?!\s*swiftlint:).*|\/\*[\s\S]*?\*\/) # matching pattern
capture_group: 0 # number of regex capture group to highlight the rule violation at. optional.
match_kinds: # SyntaxKinds to match. optional.
- comment
message: "No commented code in devel branch allowed." # violation message. optional.
message: No commented code in devel branch allowed. # violation message. optional.
severity: warning # violation severity. optional.