Skip to content

Commit 27e9d65

Browse files
Merge pull request #760 from JeneaVranceanu/fix/swiftlint-config
fix: swiftlint configuration file
2 parents fff111c + 1978d3b commit 27e9d65

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

.swiftlint.yml

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,47 @@
11
excluded:
2-
- Carthage
3-
- Pods
42
- .build
53
- Build
4+
- Carthage
65
- DerivedData
6+
- Pods
77

88
disabled_rules:
9-
- type_name
9+
- function_parameter_count
1010
- identifier_name
1111
- line_length
1212
- multiple_closures_with_trailing_closure
13+
- nesting
1314
- todo
15+
- type_name
1416

1517
opt_in_rules:
16-
- weak_delegate
17-
- unused_import
18-
- unneeded_parentheses_in_closure_argument
19-
- trailing_closure
20-
- static_operator
21-
- redundant_nil_coalescing
22-
- override_in_extension
23-
- legacy_objc_type
24-
- implicitly_unwrapped_optional
25-
- force_unwrapping
26-
- empty_string
27-
- closure_body_length
28-
- fallthrough
29-
- indentation_width
18+
- closure_body_length
19+
- empty_string
20+
- fallthrough
21+
- force_unwrapping
22+
- implicitly_unwrapped_optional
23+
- indentation_width
24+
- legacy_objc_type
25+
- override_in_extension
26+
- redundant_nil_coalescing
27+
- static_operator
28+
- trailing_closure
29+
- unneeded_parentheses_in_closure_argument
30+
- unused_import
31+
- weak_delegate
3032

3133
# force warnings
3234
force_cast: error
3335
force_try: error
3436

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

0 commit comments

Comments
 (0)