forked from artemnovichkov/Carting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.swiftlint.yml
66 lines (50 loc) · 1.14 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
# paths to ignore during linting. Takes precedence over `included`.
excluded:
- Carthage/
- Pods/
- .build/
# Rules
opt_in_rules:
- conditional_returns_on_newline
- fatal_error_message
- overridden_super_call
- closure_end_indentation
- closure_spacing
- empty_string
- explicit_init
- first_where
- joined_default_parameter
- multiline_parameters
- prohibited_super_call
- sorted_first_last
- untyped_error_in_catch
disabled_rules:
- cyclomatic_complexity
- function_body_length
force_cast: error
force_try: error
colon:
apply_to_dictionaries: false
identifier_name:
excluded:
- id
- URL
statement_position:
statement_mode: uncuddled_else
# Constants
file_length:
warning: 1000
error: 1500
type_body_length:
warning: 800
error: 1000
line_length: 160
function_parameter_count: 4
type_name:
min_length: 2 # only warning
# Custom rules
custom_rules:
accessors_and_observers_on_newline:
name: "Property accessors and observers on newline"
regex: "^\\s*(get|set|didSet|willSet)[\\h\\S]\\{[\\h\\S]+$"
message: "Property accessors and observers should always start with a newline."