-
Notifications
You must be signed in to change notification settings - Fork 211
/
.swiftlint.yml
104 lines (91 loc) · 2.49 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
excluded:
- Scripts
- Package.swift
- Dependencies
- Sources/StreamChatUI/Generated
- Sources/StreamChatUI/StreamSwiftyGif
- Sources/StreamChatUI/StreamSwiftyMarkdown
- Sources/StreamChatUI/StreamNuke
- Sources/StreamChat/StreamStarscream
- Sources/StreamChatUI/StreamDifferenceKit
- vendor
- UISDKdocumentation
- Tests
- TestTools
- Pods
- .build
- spm_cache
- vendor/bundle
- .ruby-lsp
- derived_data
disabled_rules:
- large_tuple
- multiple_closures_with_trailing_closure
- todo
- function_parameter_count
- type_name
- nesting
- identifier_name
- file_length
- type_body_length
- opening_brace
- line_length
- switch_case_alignment
- notification_center_detachment
# TODO: https://github.com/GetStream/ios-issues-tracking/issues/538
- attributes # it should be included in `opt_in_rules`
- orphaned_doc_comment
- void_function_in_ternary
- unneeded_synthesized_initializer
- ns_number_init_as_function_reference
- for_where
opt_in_rules:
- convenience_type
- empty_string
- fatal_error_message
- first_where
- toggle_bool
- identical_operands
- joined_default_parameter
- unavailable_function
- explicit_init
- redundant_optional_initialization
- syntactic_sugar
- multiline_arguments
- multiline_function_chains
- file_name_no_space
analyzer_rules:
- unused_import
multiline_arguments:
only_enforce_after_first_closure_on_first_line: true
# TODO: https://github.com/GetStream/ios-issues-tracking/issues/538
# attributes:
# always_on_same_line: ["@IBAction", "@NSManaged", "@objc"]
# always_on_line_above: ["@discardableResult"]
trailing_whitespace:
ignores_empty_lines: true
function_body_length:
warning: 150
error: 200
file_name_no_space:
severity: error
identifier_name:
excluded: [r, g, b, a, x, y, z, dx, dy, dz, i, j, k, id, op, or, me, at, to, in]
allowed_symbols: ["_"]
validates_start_with_lowercase: "warning"
cyclomatic_complexity:
ignores_case_statements: true
warning: 25
error: 30
custom_rules:
regular_constraints_forbidden:
included: "Sources/StreamChatUI"
regex: "(.constraint)\\("
capture_group: 1
match_kinds:
- identifier
message: "Regular constraint methods are forbidden. Use `.pin()` instead."
coredata_date_forbidden:
included: "Sources/StreamChat/Database/DTOs"
regex: "@NSManaged(| \\S*)* var \\S*: (NS)?Date"
message: "Please define dates as DBDate instead of Date or NSDate. Check the definition of DBDate for more information"