-
Notifications
You must be signed in to change notification settings - Fork 444
/
.swiftlint.yml
73 lines (69 loc) · 1.84 KB
/
.swiftlint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
excluded:
- .build
- Build
- Carthage
- DerivedData
- Pods
analyzer_rules:
- unused_import
disabled_rules:
- block_based_kvo
- closure_body_length
- computed_accessors_order
- cyclomatic_complexity
- duplicate_imports
- empty_enum_arguments
- empty_string
- file_length
- for_where
- force_cast
- force_try
- force_unwrapping
- function_body_length
- function_parameter_count
- identifier_name
- implicit_getter
- implicitly_unwrapped_optional
- indentation_width
- large_tuple
- legacy_objc_type
- line_length
- multiple_closures_with_trailing_closure
- nesting
- orphaned_doc_comment
- operator_whitespace
- return_arrow_whitespace
- shorthand_operator
- todo
- trailing_closure
- type_body_length
- type_name
- unneeded_break_in_switch
- unused_optional_binding
- vertical_parameter_alignment
- xctfail_message
opt_in_rules:
- 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
- weak_delegate
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*(\/\/(?!\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.
severity: warning # violation severity. optional.