-
Notifications
You must be signed in to change notification settings - Fork 11
/
.swiftlint.yml
101 lines (97 loc) · 2.08 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
# Enable more optional rules
opt_in_rules:
- implicit_return
- let_var_whitespace
- unneeded_parentheses_in_closure_argument
- closure_spacing
- explicit_init
- overridden_super_call
- closure_end_indentation
- empty_count
- empty_string
- fatal_error_message
- force_unwrapping
- force_try
- force_cast
- switch_case_on_newline
- redundant_nil_coalescing
- prohibited_super_call
- operator_usage_whitespace
- object_literal
- number_separator
- nimble_operator
- implicitly_unwrapped_optional
- first_where
- multiline_parameters
- multiline_arguments
- discouraged_optional_collection
- discouraged_optional_boolean
- trailing_closure
- vertical_parameter_alignment_on_call
- no_fallthrough_only
- file_name
- empty_xctest_method
- convenience_type
- redundant_set_access_control
- multiline_function_chains
- toggle_bool
- identical_operands
- collection_alignment
- static_operator
- legacy_random
- closure_body_length
- last_where
- multiline_literal_brackets
- multiline_parameters_brackets
- multiline_arguments_brackets
- weak_delegate
disabled_rules:
- implicit_getter
# Exclude tests, pods and vendor sources
excluded:
- build
- CineasteUITests/SnapshotHelper.swift
- DerivedData
- .build
# Configure warning/error levels
file_length:
warning: 450
error: 500
function_body_length:
warning: 100
error: 150
function_parameter_count:
warning: 9
error: 10
identifier_name:
max_length:
warning: 45
error: 60
min_length:
warning: 1
type_name:
max_length:
warning: 40
error: 70
min_length:
warning: 3
line_length:
warning: 120
error: 250
ignores_function_declarations: true
ignores_comments: true
ignores_interpolated_strings: true
ignores_urls: true
# Configure rules violation to be treated as an error
explicit_init:
severity: error
prohibited_super_call:
severity: error
overridden_super_call:
severity: error
force_unwrapping:
severity: error
weak_delegate:
severity: error
multiline_arguments:
only_enforce_after_first_closure_on_first_line: true