forked from connectrpc/connect-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.swiftlint.yml
125 lines (124 loc) · 3.04 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
included:
- Examples/ElizaSharedSources/AppSources
- Libraries
- Plugins
- Tests
excluded:
- Libraries/Connect/Internal/GeneratedSources
- Tests/ConformanceClient/GeneratedSources
- Tests/UnitTests/ConnectLibraryTests/GeneratedSources
disabled_rules:
- blanket_disable_command
- cyclomatic_complexity
- file_length
- function_body_length
- function_parameter_count
- identifier_name
- opening_brace
- nesting
- redundant_string_enum_value
- todo
- type_body_length
- type_name
- unavailable_function
opt_in_rules:
- array_init
- attributes
- closure_end_indentation
- closure_spacing
- collection_alignment
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- discouraged_object_literal
- empty_collection_literal
- empty_count
- empty_string
- empty_xctest_method
- enum_case_associated_values_count
- explicit_init
- fallthrough
- fatal_error_message
- file_name
- first_where
- flatmap_over_map_reduce
- identical_operands
- inclusive_language
- joined_default_parameter
- legacy_random
- let_var_whitespace
- last_where
- literal_expression_end_indentation
- lower_acl_than_parent
- modifier_order
- nimble_operator
- nslocalizedstring_key
- number_separator
- operator_usage_whitespace
- overridden_super_call
- override_in_extension
- prefer_self_in_static_references
- private_action
- prohibited_super_call
- quick_discouraged_call
- quick_discouraged_focused_test
- quick_discouraged_pending_test
- reduce_into
- redundant_nil_coalescing
- redundant_type_annotation
- single_test_class
- sorted_first_last
- sorted_imports
- static_operator
- toggle_bool
- unavailable_function
- unneeded_parentheses_in_closure_argument
- unowned_variable_capture
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- xct_specific_matcher
- yoda_condition
trailing_whitespace:
ignores_comments: false
ignores_empty_lines: false
trailing_comma:
mandatory_comma: true
line_length: 100
private_over_fileprivate:
validate_extensions: true
modifier_order:
preferred_modifier_order:
- acl
- setterACL
- final
- override
- required
- typeMethods
- mutators
- owned
- lazy
- dynamic
- convenience
deployment_target:
iOS_deployment_target: 12.0
custom_rules:
newline_after_brace:
name: "Opening braces shouldn't have empty lines under them"
regex: '\{\n\n'
newline_before_brace:
name: "Closing braces shouldn't have empty lines before them"
regex: '\n\n\}'
sendable_order:
name: "@escaping should precede @Sendable when used together"
regex: '@Sendable\s+@escaping'
space_before_comma:
name: "Commas should never have a space before them"
regex: '\s+,'
spaces_over_tabs:
name: "Use (4) spaces instead of tabs"
regex: '\t'
xctestcase:
name: "Use XCTestCase over XCTest to ensure tests run properly"
regex: ': XCTest[\s,]+'