Skip to content

Commit 78c8f6c

Browse files
fix: swiftlint commented_out_code rule fixes
1 parent 909b323 commit 78c8f6c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.swiftlint.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ excluded:
66
- DerivedData
77

88
disabled_rules:
9-
- function_parameter_count
10-
- nesting
119
- type_name
1210
- identifier_name
1311
- line_length
1412
- multiple_closures_with_trailing_closure
1513
- todo
1614
- indentation_width
15+
- function_parameter_count
16+
- nesting
1717

1818
opt_in_rules:
1919
- weak_delegate
@@ -29,20 +29,19 @@ opt_in_rules:
2929
- empty_string
3030
- closure_body_length
3131
- fallthrough
32-
- commented_out_code
3332

3433
# force warnings
3534
force_cast: error
3635
force_try: error
3736

3837
custom_rules:
3938
commented_out_code:
40-
included: ".*\\.swift" # regex that defines paths to include during linting. optional.
41-
excluded: ".*Test(s)?\\.swift" # regex that defines paths to exclude during linting. optional
42-
name: "Commented out code" # rule name. optional.
43-
regex: "^\\s*(\/\/(?!\\s*swiftlint:).*|\/\\*[\\s\\S]*?\\*\/)" # 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
4443
capture_group: 0 # number of regex capture group to highlight the rule violation at. optional.
4544
match_kinds: # SyntaxKinds to match. optional.
4645
- comment
47-
message: "No commented code in devel branch allowed." # violation message. optional.
46+
message: No commented code in devel branch allowed. # violation message. optional.
4847
severity: warning # violation severity. optional.

0 commit comments

Comments
 (0)