-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.swiftlint.yml
133 lines (132 loc) · 3.05 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# https://raw.githubusercontent.com/Fueled/swiftlint-yml/master/.swiftlint.yml
disabled_rules:
- trailing_whitespace
- anonymous_argument_in_multiline_closure
- anyobject_protocol
- closure_body_length
- conditional_returns_on_newline
- convenience_type
- discouraged_optional_collection
- explicit_acl
- explicit_enum_raw_value
- explicit_top_level_acl
- explicit_type_interface
- file_types_order
- force_unwrapping
- function_default_parameter_at_end
- implicit_return
- implicitly_unwrapped_optional
- indentation_width
- inert_defer
- missing_docs
- multiline_arguments
- multiline_arguments_brackets
- multiline_function_chains
- multiline_literal_brackets
- multiline_parameters
- multiline_parameters_brackets
- no_extension_access_modifier
- no_grouping_extension
- no_magic_numbers
- prefer_nimble
- prefer_self_in_static_references
- prefixed_toplevel_constant
- redundant_self_in_closure
- required_deinit
- self_binding
- sorted_enum_cases
- strict_fileprivate
- superfluous_else
- switch_case_on_newline
- todo
- trailing_closure
- type_contents_order
- unused_capture_list
- vertical_whitespace_between_cases
included: # paths to include during linting. `--path` is ignored if present.
- source/app
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Carthage
- Pods
- source/app/supportfiles
- source/test
analyzer_rules:
- unused_declaration
- unused_import
type_body_length:
warning: 300
error: 400
line_length:
warning: 250
error: 300 # Default is 200, so swiftlint would output an error if the file length is between 200 and 220
file_length:
warning: 350
error: 400
type_name:
min_length: 2
max_length: 60
trailing_semicolon: error
trailing_comma:
mandatory_comma: true
severity: warning
function_body_length:
warning: 150
error: 300
statement_position:
statement_mode: default
severity: error
colon:
severity: error
# private_outlet:
# severity: warning
# allow_private_set: true
identifier_name:
min_length:
warning: 4
max_length:
warning: 50
error: 60
severity: error
excluded:
- x
- y
- z
- i
- j
- k
- l
- id
- URL
- r
- g
- b
- a
- t
- v
- y
- u
- on
- no
- qa
- id
- top
- row
return_arrow_whitespace: error
legacy_constructor: error
legacy_constant: error
leading_whitespace: error
shorthand_operator: warning
reporter: "xcode"
custom_rules:
protocol_conformance:
name: "Protocol Conformance"
message: "Protocol conformance should be declared in separate extensions in the same file"
regex: "(class|struct|extension)[[:space:]]+(?i:(?![^d]*delegate:))[^'\"()<>{},!?:]+:([^'\"<>(){},!?:]+,)+[^'\"<>(){},!?:]*\\{"
match_kinds:
- keyword
severity: warning
nested_self_usage:
name: "Nested .self usage"
message: ".self shouldn't be used more than once on a given statement"
regex: "(?<!\")self\\.(?:\\p{L}+\\.)*self"
severity: warning