-
Notifications
You must be signed in to change notification settings - Fork 14
/
.swiftlint.yml
111 lines (105 loc) · 3.61 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
# potential rules to enable:
# trailing_closure
# self_in_property_initialization
# prefer_self_in_static_references
# prefer_self_type_over_type_of_self
# redundant_self_in_closure
# direct_return
# implicit_return
# redundant_nil_coalescing
# redundant_type_annotation
# unneeded_parentheses_in_closure_argument
# untyped_error_in_catch
# unused_capture_list
# TODO: also check disabled_rules
opt_in_rules:
- closure_spacing
- file_header
- literal_expression_end_indentation
- multiline_parameters
- operator_usage_whitespace
- reduce_into
- self_binding
- self_in_property_initialization
- shorthand_optional_binding
- sorted_imports
- unhandled_throwing_task
- unneeded_parentheses_in_closure_argument
- unused_optional_binding
- yoda_condition
disabled_rules:
- cyclomatic_complexity
- discarded_notification_center_observer
- file_length
- force_cast
- force_try
- function_body_length
- function_parameter_count
- generic_type_name
- identifier_name
- inclusive_language
- large_tuple
- nesting
- no_fallthrough_only
- notification_center_detachment
- optional_data_string_conversion
- todo
- type_body_length
- type_name
- unused_setter_value
- xctfail_message
file_header:
required_pattern: |
\/\/
\/\/ Wire
\/\/ Copyright \(C\) 2024 Wire Swiss GmbH
\/\/
\/\/ This program is free software\: you can redistribute it and\/or modify
\/\/ it under the terms of the GNU General Public License as published by
\/\/ the Free Software Foundation\, either version 3 of the License\, or
\/\/ \(at your option\) any later version\.
\/\/
\/\/ This program is distributed in the hope that it will be useful,
\/\/ but WITHOUT ANY WARRANTY\; without even the implied warranty of
\/\/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\. See the
\/\/ GNU General Public License for more details\.
\/\/
\/\/ You should have received a copy of the GNU General Public License
\/\/ along with this program. If not, see http\:\/\/www\.gnu\.org\/licenses\/\.
\/\/
custom_rules:
todo_requires_jira_link:
name: "TODO: Requires Jira Link"
regex: '(TODO|FIX\s?ME|FIXME): (?!\[WPB-\d+\])'
match_kinds: [comment]
message: "Add JIRA reference to TODOs and FIX MEs like [WPB-680]."
severity: warning
excluded:
- "**/.build"
- "**/AutoMockable.generated.swift"
- "**/DerivedData"
- "**/Package.swift"
- "**/Package@swift-*.swift"
- Carthage
- DerivedData
- WireUI/Sources/WireDesign/Icons/Autogenerated/StyleKitIcons.generated.swift
- WireUI/Sources/WireDesign/Icons/Autogenerated/WireStyleKit.swift
- fastlane
- sourcery
- vendor
- wire-ios/Templates
- wire-ios-protos/Protos/messages.pb.swift
- wire-ios-protos/Protos/mls.pb.swift
- wire-ios-protos/Protos/otr.pb.swift
- wire-ios-protos/Scripts/generate_header.swift
- wire-ios-sync-engine/Support/Sourcery/generated/AutoMockable.manual.swift
- wire-ios/Wire-iOS Share Extension/Generated/Strings+Generated.swift
- wire-ios/Wire-iOS/Generated/Assets+Generated.swift
- wire-ios/Wire-iOS/Generated/Strings+Generated.swift
# In order to deal with the huge number of violations, first set
# very high limits then iteratively reduce the limits and resolve
# the few violations. Repeat this until we find suitable limits.
line_length:
warning: 500
error: 500
swiftlint_version: 0.57.0