-
Notifications
You must be signed in to change notification settings - Fork 0
/
.swiftlint.yml
101 lines (88 loc) · 1.87 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
# SwiftLint Configuration File
# Exclude specific files and directories
excluded:
- Carthage
- Pods
- fastlane
# Customize warning and error thresholds
warning_threshold: 10
# Disable certain rules
disabled_rules:
- trailing_whitespace
- colon
- comma
- control_statement
- cyclomatic_complexity
- large_tuple
- shorthand_operator
- duplicate_conditions
- empty_count
- strict_fileprivate
- computed_accessors_order
- duplicate_imports
- inclusive_language
- discouraged_object_literal
- private_over_fileprivate
- redundant_optional_initialization
- syntactic_sugar
- static_over_final_class
- todo
# Customize rules
opt_in_rules:
- explicit_init
- first_where
- force_cast
- force_try
- implicit_getter
- joined_default_parameter
- missing_docs
- modifier_order
- private_outlet
- protocol_property_accessors_order
- single_test_class
- sorted_first_last
- toggle_bool
- unavailable_function
- unneeded_break_in_switch
- vertical_parameter_alignment_on_call
allow_zero_lintable_files: false
# Customize rule parameters
line_length:
warning: 120
error: 200
ignores_comments: true
ignores_interpolated_strings: true
type_body_length:
warning: 300
error: 500
file_length:
warning: 500
error: 1200
ignore_comment_only_lines: true
function_body_length:
warning: 40
error: 75
# Rule configuration
identifier_name:
min_length:
warning: 3
error: 2
max_length:
warning: 40
error: 60
type_name:
min_length:
warning: 3
error: 2
max_length:
warning: 40
error: 60
# Reporting
reporter: "json" # available: "xcode", "json", "csv", "checkstyle", "junit", "html", "emoji"
# Custom severity levels
custom_rules:
ForceUnwrapping:
name: "Force Unwrapping"
regex: '\!\s'
message: "Avoid using force unwrapping. Consider using optional binding."
severity: error