-
-
Notifications
You must be signed in to change notification settings - Fork 104
/
.swiftlint.yml
86 lines (79 loc) · 2.25 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
# SwiftLint Configuration
## Folders to exclude from linting
excluded:
- go
- Pods
- vendor
- xcode
## Active rules
opt_in_rules:
- all
disabled_rules:
- anonymous_argument_in_multiline_closure
- balanced_xctest_lifecycle
- contrasted_opening_brace
- discouraged_none_name
- discouraged_object_literal
- discouraged_optional_collection # Too many false positives in implementations of system protocols.
- empty_count # Too many false positives for variables named 'count'.
- explicit_acl
- explicit_enum_raw_value # Disabled in favor of 'redundant_string_enum_value'.
- explicit_top_level_acl
- explicit_type_interface
- extension_access_modifier
- file_header
- file_length
- file_name
- file_types_order
- force_cast
- force_try
- force_unwrapping
- function_body_length
- implicitly_unwrapped_optional
- indentation_width
- inert_defer # Deprecated.
- legacy_objc_type
- line_length
- missing_docs
- no_empty_block # To be fixed later.
- no_extension_access_modifier
- no_grouping_extension
- no_magic_numbers # Causes a lot of violations in tests.
- number_separator # Contradicts with SwiftFormat rule 'decimalgrouping'. There are not many numbers anyway in the source code.
- one_declaration_per_file
- prefer_nimble
- prefixed_toplevel_constant # Violations are mostly in test code.
- private_outlet
- prohibited_interface_builder
- prohibited_super_call
- required_deinit
- self_binding
- sorted_enum_cases # Wait for an auto-fix.
- sorted_imports # Managed by SwiftFormat.
- type_body_length
- type_contents_order
- unowned_variable_capture
- unused_capture_list # Deprecated.
- vertical_whitespace_between_cases # Additional whitespace not needed because of visible indentation.
## Configuration for specific rules
attributes:
always_on_same_line: []
closure_body_length:
warning: 40
error: 60
explicit_init:
include_bare_init: true
identifier_name:
excluded: ["id", "to", "Defaults"]
allowed_symbols: ["_"]
multiline_arguments:
only_enforce_after_first_closure_on_first_line: true
type_name:
max_length: 50
trailing_closure:
only_single_muted_parameter: true
trailing_comma:
mandatory_comma: true
xct_specific_matcher:
matchers:
- two-argument-asserts