Skip to content

Commit 909aa2c

Browse files
committed
Added recommended opt-in rules from issue #436
removed the custom force_unwrap rule in favour of built in one
1 parent d472263 commit 909aa2c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

.swiftlint.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@ disabled_rules:
1212
- multiple_closures_with_trailing_closure
1313
- todo
1414

15+
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+
1530
# force warnings
1631
force_cast: error
1732
force_try: error
@@ -27,18 +42,3 @@ custom_rules:
2742
- comment
2843
message: "No commented code in devel branch allowed." # violation message. optional.
2944
severity: warning # violation severity. optional.
30-
31-
force_unwrap: # rule identifier
32-
included: ".*\\.swift" # regex that defines paths to include during linting. optional.
33-
excluded: ".*Test(s)?\\.swift" # regex that defines paths to exclude during linting. optional
34-
name: "Force unwrap function" # rule name. optional.
35-
regex: "([\\}\\)\\w]!)" # matching pattern
36-
capture_group: 0 # number of regex capture group to highlight the rule violation at. optional.
37-
match_kinds: # SyntaxKinds to match. optional.
38-
- identifier
39-
message: "Please make it safe way, or disable this warning localy." # violation message. optional.
40-
severity: error # violation severity. optional.
41-
42-
43-
44-

0 commit comments

Comments
 (0)