-
Notifications
You must be signed in to change notification settings - Fork 1
/
.swiftlint.yml
143 lines (130 loc) · 3.09 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
134
135
136
137
138
139
140
141
142
143
disabled_rules:
# - class_delegate_protocol
# - closing_brace
- closure_parameter_position
# - colon
# - comma
# - compiler_protocol_init
# - control_statement
# - custom_rules
# - cyclomatic_complexity
# - discarded_notification_center_observer
# - dynamic_inline
# - empty_enum_arguments
# - empty_parameters
# - empty_parentheses_with_trailing_closure
# - explicit_top_level_acl (opt-in)
# - file_length
# - for_where
# - force_cast
# - force_try
# - generic_type_name
# - implicit_getter
# - large_tuple
# - leading_whitespace
# - legacy_cggeometry_functions
# - legacy_constant
# - legacy_constructor
# - legacy_nsgeometry_functions
# - line_length
# - mark
# - nesting
# - notification_center_detachment
# - opening_brace
# - operator_whitespace
# - private_unit_test
# - protocol_property_accessors_order
# - redundant_discardable_let
# - redundant_optional_initialization
# - redundant_string_enum_value
# - redundant_void_return
# - return_arrow_whitespace
# - shorthand_operator
# - statement_position
# - syntactic_sugar
# - todo
# - trailing_comma
# - trailing_newline
# - trailing_semicolon
# - trailing_whitespace
# - type_body_length
# - unused_closure_parameter
# - unused_enumerated
# - unused_optional_binding
# - valid_ibinspectable
# - vertical_parameter_alignment
# - vertical_whitespace
# - void_return
# - weak_delegate
opt_in_rules: # some rules are only opt-in
- attributes
- closure_end_indentation
- closure_spacing
- conditional_returns_on_newline
- empty_count
- explicit_init
# - explicit_type_interface
- fatal_error_message
- file_header
- first_where
- force_unwrapping
- implicit_return
- implicitly_unwrapped_optional
- nimble_operator
- no_extension_access_modifier
- number_separator
- object_literal
- operator_usage_whitespace
- overridden_super_call
- private_outlet
- prohibited_super_call
- redundant_nil_coalescing
- sorted_imports
- switch_case_on_newline
included: # paths to include during linting. `--path` is ignored if present.
- Sources
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Sources/NadaADeclararTests
# configurable rules can be customized from this configuration file
# binary rules can set their severity level
closure_end_indentation: error
closure_spacing: error
conditional_returns_on_newline: error
empty_count: error
explicit_init: error
force_cast: error
attributes:
severity: error
force_try:
severity: warning # explicitly
function_body_length:
warning: 40
error: 100
function_parameter_count:
warning: 5
error: 8
line_length:
warning: 200
error: 200
type_body_length:
warning: 300
error: 400
file_length:
warning: 200
error: 200
# naming rules can set warnings/errors for min_length and max_length
# additionally they can set excluded names
type_name:
min_length:
error: 3
max_length: # warning and error
warning: 40
error: 50
excluded: iPhone # excluded via string
identifier_name:
min_length:
error: 3
excluded: # excluded via string array
- id
- URL
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit, html, emoji)