-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.swiftlint.yml
75 lines (62 loc) · 1.4 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
opt_in_rules:
- closure_end_indentation
- closure_spacing
- fatal_error_message
- force_unwrapping
- sorted_imports
- operator_whitespace
- operator_usage_whitespace
- redundant_nil_coalescing
- switch_case_on_newline
- attributes
- no_extension_access_modifier
- explicit_init
- vertical_parameter_alignment_on_call
- overridden_super_call
- shorthand_operator
- for_where
# rule identifiers to exclude from running
disabled_rules:
- colon
- closure_parameter_position
- opening_brace
- file_length
- private_over_fileprivate
- identifier_name
# paths to ignore during linting
excluded:
- Carthage
- Pods
- Example/Pods
# identifier_name:
# excluded via string array
# excluded:
# - to
# - up
line_length:
error: 80
warning: 80
large_tuple: 4
cyclomatic_complexity: 20
nesting:
type_level: 2
trailing_whitespace:
ignores_empty_lines: true
ignores_comments: true
function_body_length:
warning: 60
error: 80
attributes:
always_on_same_line: ["@IBAction", "@IBOutlet", "@IBInspectable"]
always_on_line_above: ["@IBDesignable", "@UIApplicationMain", "@discardableResult", "@objc"]
custom_rules:
disallow_tabs:
name: "Tabs"
regex: "(\\t+)"
message: "Use whitespaces instead."
severity: error
whiespace_lines:
name: "Whitespace lines"
regex: "^\\s+\\n"
message: "Remove lines out of whitespaces."
severity: error