Skip to content

Commit fa44455

Browse files
Merge pull request #499 from mloit/swiftlint
2 parents f14a1bb + 909aa2c commit fa44455

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.swiftlint.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
excluded:
2+
- Carthage
3+
- Pods
4+
- .build
5+
- Build
6+
- DerivedData
7+
8+
disabled_rules:
9+
- type_name
10+
- identifier_name
11+
- line_length
12+
- multiple_closures_with_trailing_closure
13+
- todo
14+
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+
30+
# force warnings
31+
force_cast: error
32+
force_try: error
33+
34+
custom_rules:
35+
commented_out_code:
36+
included: ".*\\.swift" # regex that defines paths to include during linting. optional.
37+
excluded: ".*Test(s)?\\.swift" # regex that defines paths to exclude during linting. optional
38+
name: "Commented out code" # rule name. optional.
39+
regex: "^\\/\\/\\s*(@|\\.?([a-z]|(\\})))" # matching pattern
40+
capture_group: 0 # number of regex capture group to highlight the rule violation at. optional.
41+
match_kinds: # SyntaxKinds to match. optional.
42+
- comment
43+
message: "No commented code in devel branch allowed." # violation message. optional.
44+
severity: warning # violation severity. optional.

0 commit comments

Comments
 (0)