This repository has been archived by the owner on Oct 30, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy path.swiftlint.yml
70 lines (61 loc) · 1.59 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
disabled_rules:
- cyclomatic_complexity
- empty_parentheses_with_trailing_closure
- file_length
- function_body_length
- function_parameter_count
- identifier_name
- line_length
- nesting
- todo
- type_body_length
- large_tuple
- for_where
- no_fallthrough_only
# Re-enable the next few over time
- trailing_whitespace
- force_cast
- type_name
- force_try
opt_in_rules:
- array_init
- closure_spacing
- contains_over_first_not_nil
- fatal_error_message
- operator_usage_whitespace
- sorted_first_last
- sorted_imports
excluded:
- CoreData_Models
- "*+CoreDataClass.swift"
- "*+CoreDataProperties.swift"
- Pods
control_statement:
severity: warning
shorthand_operator:
severity: warning
type_name:
min_length: 2
trailing_comma:
mandatory_comma: true
custom_rules:
straight_quotes:
included: "Localized.swift"
name: "Straight Quotes"
regex: "'|\""
match_kinds:
- docComment
message: "Quotes and apostrophes in localized strings should be curly: “” ‘’"
severity: warning
slow_anchorage_syntax:
name: "Slow Anchorage == Syntax"
regex: "(?:edge|horizontal|vertical|leading|trailing|top|bottom|left|right|height|width|centerX|centerY)Anchors?\\s*(==|<=|>=)"
message: "Wrap Anchorage operators with //. For example, use /==/ instead of ==."
severity: warning
swift_migrator_functions:
name: "Swift Migrator Functions"
regex: "\\/\\/ Helper function inserted by Swift \\d(.\\d)* migrator."
message: "Function left over from automatic Swift version migrator. Refactor or eliminate."
severity: warning
excluded:
- Pods