-
Notifications
You must be signed in to change notification settings - Fork 3
/
swiftlint.yml
109 lines (99 loc) · 2.65 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
whitelist_rules:
- attributes
- class_delegate_protocol
- closing_brace
- closure_end_indentation
- closure_parameter_position
- closure_spacing
- collection_alignment
- colon
- comma
- conditional_returns_on_newline
- control_statement
- convenience_type
- custom_rules
- cyclomatic_complexity
- discouraged_optional_boolean
- duplicate_imports
- empty_count
- empty_parameters
- empty_parentheses_with_trailing_closure
- empty_string
- explicit_init
- file_length
- first_where
- force_cast
- force_try
- force_unwrapping
- function_parameter_count
- implicit_getter
- implicitly_unwrapped_optional
- inert_defer
- large_tuple
- last_where
- leading_whitespace
- legacy_cggeometry_functions
- legacy_constant
- legacy_constructor
- legacy_hashing
- legacy_nsgeometry_functions
- line_length
- literal_expression_end_indentation
- mark
- multiline_arguments
- multiline_literal_brackets
- notification_center_detachment
- opening_brace
- operator_usage_whitespace
- redundant_discardable_let
- redundant_optional_initialization
- redundant_nil_coalescing
- redundant_void_return
- return_arrow_whitespace
- shorthand_operator
- statement_position
- syntactic_sugar
- todo
- toggle_bool
- trailing_comma
- trailing_newline
- trailing_semicolon
- trailing_whitespace
- unused_import
- unused_optional_binding
- unused_setter_value
- vertical_whitespace
- void_return
- weak_delegate
disabled_rules: # rule identifiers to exclude from running
opt_in_rules: # some rules are only opt-in
included:
- SummerChallenge
excluded: # paths to ignore during linting. Takes precedence over `included`.
- fastlane
- Pods
- .bundle
custom_rules:
image_name_initialization: # Disable UIImage init from name
included: ".*.swift"
name: "Image initialization"
regex: 'UIImage\(named:[^)]+\)'
message: "Use UIImage(assetName: ) instead"
severity: error
open_iboutlets:
included: ".*.swift"
name: "IBOutlet opening"
regex: "@IBOutlet ?(weak){0,1} var"
message: "IBOutlet should be private or fileprivate"
severity: error
open_ibaction:
included: ".*.swift"
name: "IBAction opening"
regex: "@IBAction func"
message: "IBAction should be private or fileprivate"
severity: error
line_length: 120
file_length:
warning: 500
error: 1200
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit)