-
Notifications
You must be signed in to change notification settings - Fork 85
/
.swiftlint.yml
61 lines (59 loc) · 1.41 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
# Rules for SwiftLint s
# https://github.com/realm/SwiftLint/blob/master/Rules.md
excluded:
- Carthage
- Contentful.playground
- Packages
- Tests
- .build
- build
disabled_rules:
- syntactic_sugar
- type_body_length
- type_name
- cyclomatic_complexity
- function_parameter_count
- legacy_constant
- force_cast
- force_try
# Rule that says says type that conforms to protocol must be a class.
# If we are in pure swift, this is not necessary.
- class_delegate_protocol
- weak_delegate
- vertical_parameter_alignment
# ignoring since some file that exists on travis, but not locally is throwing this as a compile error
# Also, swiftlint says it will be removed in future versions
- identifier_name
- nesting # Disable warnings about structures nested more than 1 level deep.
opt_in_rules:
- first_where
- fatal_error_message
- attributes
- unused_private_declaration
- closure_end_indentation
- collection_alignment
- contains_over_first_not_nil
- convenience_type
- empty_count
- empty_string
- explicit_acl
- multiline_arguments
- multiline_parameters
- toggle_bool
- unneeded_parentheses_in_closure_argument
# Parameterized
line_length:
warning: 150
ignores_comments: true
ignores_urls: true
ignores_function_declarations: true
ignores_interpolated_strings: true
file_length:
warning: 850
vertical_whitespace:
max_empty_lines: 2
function_body_length: 110
#identifier_name:
# min_length: 2
# max_length: 30
#