-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.swiftlint.yml
More file actions
174 lines (158 loc) · 4.67 KB
/
Copy path.swiftlint.yml
File metadata and controls
174 lines (158 loc) · 4.67 KB
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
opt_in_rules:
- array_init
- closure_spacing
- 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
- explicit_init
- explicit_type_interface
- file_header
- first_where
- flatmap_over_map_reduce
- force_unwrapping
- identical_operands
- implicit_return
- implicitly_unwrapped_optional
- joined_default_parameter
- last_where
- legacy_multiple
- legacy_random
- line_length
- literal_expression_end_indentation
- lower_acl_than_parent
- modifier_order
- multiline_parameters
- nimble_operator
- nslocalizedstring_key
- operator_usage_whitespace
- optional_enum_case_matching
- orphaned_doc_comment
- overridden_super_call
- override_in_extension
- pattern_matching_keywords
- prefer_self_type_over_type_of_self
- private_action
- private_over_fileprivate
- prohibited_super_call
- quick_discouraged_call
- quick_discouraged_focused_test
- quick_discouraged_pending_test
- raw_value_for_camel_cased_codable_enum
- redundant_nil_coalescing
- single_test_class
- sorted_first_last
- sorted_imports
- toggle_bool
- trailing_closure
- unneeded_parentheses_in_closure_argument
- unowned_variable_capture
- untyped_error_in_catch
- vertical_parameter_alignment_on_call
- vertical_whitespace_opening_braces
- vertical_whitespace_closing_braces
- yoda_condition
disabled_rules:
- trailing_comma
- identifier_name
- prohibited_interface_builder
- file_length
- no_space_in_method_call
- enum_case_associated_values_count
- type_name
type_body_length: 635
line_length: 200
function_body_length: 125
function_parameter_count: 6
nesting:
type_level: 3
cyclomatic_complexity:
ignores_case_statements: true
warning: 14
error: 15
file_header:
forbidden_string: Created
explicit_type_interface:
excluded:
- local
swiftlint_version: 0.62.2
implicit_return:
included:
- closure
trailing_closure:
only_single_muted_parameter: true
modifier_order:
preferred_modifier_order:
- acl
- setterACL
- override
- dynamic
- mutators
- lazy
- final
- required
- convenience
- typeMethods
- owned
custom_rules:
enum_constants:
regex: "enum Constants"
name: "Constants enum"
message: "Name your constants enum 'Constant'"
severity: warning
struct_constant:
regex: "struct Constant"
name: "Constants struct"
message: "Put your constants in an 'enum Constant'"
severity: warning
constant_enum_at_bottom:
regex: '\{\s+private enum Constant'
name: "Constants enum at the bottom of scope"
message: "Put your constants enum at the bottom of the scope"
severity: warning
no_assertions:
regex: '^\h*(assert|assertionFailure|preconditionFailure|precondition|dispatchPrecondition)\('
name: "Assertions In Non-Test Code"
message: "Log an error using Sentry or something else rather than using assertions in non-test code"
severity: warning
excluded:
# SPM .build directories and DerivedData. Listed individually because
# glob patterns like `**/.build/**` in this section trigger pathological
# O(N×M) matching against every walked file -- locally that turned a
# 1.2-second lint into a 7-minute lint AND serialized work onto a single
# core. Keep this list flat. Add a new entry when a new SPM package gets
# added under this repo, and remember that convos-task worktrees keep
# their own `.build/` under each package (already covered here because
# they're nested inside the same package paths).
- .build
- .derivedData
- .derivedData-device
- .claude/worktrees
- ConvosAppData/.build
- ConvosConnections/.build
- ConvosCore/.build
- ConvosInvites/.build
- ConvosLogging/.build
# Stale local-dev artifact from a previously-existing ConvosProfiles
# package. Not in git, but leftover `.build/` on long-lived dev clones
# would otherwise pull libxmtp's example sources into lint scope.
- ConvosProfiles/.build
# Test targets and ad-hoc helpers we don't lint
- ConvosAppData/Tests
- ConvosConnections/Tests
- ConvosCore/Tests
- ConvosInvites/Tests
- ConvosTests
- ConvosTests/Helpers
- ConvosAppClipTests
- ConvosAppClipUITests
- AgentServer
# Generated protobuf files - listed by full path because the previous
# `**/*.pb.swift` glob fell into the same pathological-matching trap.
- ConvosAppData/Sources/ConvosAppData/Proto/conversation_custom_metadata.pb.swift
- ConvosCore/Sources/ConvosCore/Profiles/Proto/profile_messages.pb.swift
- ConvosInvites/Sources/ConvosInvitesCore/Core/Proto/invite.pb.swift