-
Notifications
You must be signed in to change notification settings - Fork 85
/
.swiftlint.yml
76 lines (70 loc) · 1.9 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
disabled_rules: # rule identifiers to exclude from running
- line_length
- todo
- trailing_whitespace
- identifier_name
- void_return
- colon
- notification_center_detachment
- discarded_notification_center_observer
- type_name
- statement_position
- multiple_closures_with_trailing_closure
- no_space_in_method_call
- comment_spacing
opt_in_rules:
- sorted_first_last
- contains_over_first_not_nil
# - explicit_top_level_acl
- empty_count
- closure_spacing
# - explicit_type_interface
- fatal_error_message
- first_where
- force_unwrapping
- implicit_return
- implicitly_unwrapped_optional
- no_extension_access_modifier
- operator_usage_whitespace
- overridden_super_call
# - private_outlet
- redundant_nil_coalescing
# - switch_case_on_newline
# - vertical_parameter_alignment_on_call
excluded: # paths to ignore during linting. overridden by `included`.
- Carthage
- Pods
- fastlane
- R.generated.swift
- Dependencies
# parameterized rules can be customized from this configuration file
# first line is warning, second is error
file_length:
- 700
- 1000
line_length:
- 230
- 250
# parameterized rules are first parameterized as a warning level, then error level.
function_body_length:
- 150
- 200
type_body_length:
- 300
- 400
# naming rules can set warnings/errors for min_length and max_length
# additionally they can set excluded names
type_name:
min_length: 3 # only warning
max_length: # warning and error
warning: 40
error: 50
excluded: iPhone # excluded via string
identifier_name:
min_length: # only min_length
error: 4 # only error
excluded: # excluded via string array
- id
- URL
- GlobalAPIKey
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit, html, emoji)