-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.swiftlint.yml
79 lines (74 loc) · 2.16 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
opt_in_rules:
- closure_spacing
- empty_count
- empty_string
- fallthrough
- first_where
- force_unwrapping
- identical_operands
- implicitly_unwrapped_optional
- last_where
- legacy_multiple
- multiline_arguments
- multiline_parameters
- operator_usage_whitespace
- overridden_super_call
- prohibited_super_call
- redundant_nil_coalescing
- shorthand_operator
- sorted_imports
- switch_case_on_newline
- syntactic_sugar
- todo
- toggle_bool
- unneeded_parentheses_in_closure_argument
- unused_enumerated
- attributes
disabled_rules:
- identifier_name
- blanket_disable_command
- attributes
included:
- PACECloudSDK
- PACECloudSlimSDK
- PACECloudWatchSDK
excluded:
- PACECloudSDK/API/Generated
- PACECloudSDK/API/Pay/Generated
- PACECloudSDK/API/POI/Generated
- PACECloudSDK/API/Fueling/Generated
- PACECloudSDK/API/User/Generated
- PACECloudSDK/API/GeoJSON/Generated
- PACECloudSDK/API/Communication/Generated
- PACECloudSDK/POIKit/Vendor
- PACECloudSDK/POIKit/POIKitApi/Model
- PACECloudSDK/POIKit/POISearch/Model
line_length: 180
custom_rules:
vertical_whitespace_between_cases:
included: ".*.swift"
regex: '[^\n{][ \t]*\n[ \t]*(?:case[^\n]+|default):[ \t]*\n'
name: "Vertical Whitespace Between Cases"
message: "Include a vertical whitespace (empty line) between cases in switch statements."
severity: warning
double_space:
include: "*.swift"
name: "Double space"
regex: "([a-z,A-Z] \\s+)"
message: "Double space between keywords"
match_kinds: keyword
severity: warning
user_defaults_wrapper:
include: "*.swift"
name: "UserDefaults Wrapper"
message: "Use class 'SDKUserDefaults' to access user defaults"
regex: "(?<!struct |class |extension |enum |protocol |[a-zA-Z.])UserDefaults"
match_kinds: identifier
severity: error
keychain_wrapper:
include: "*.swift"
name: "Keychain Wrapper"
message: "Use class 'SDKKeychain' to access keychain data"
regex: "(?<!extension |[a-zA-Z.])PACECloudSDK[.]Keychain"
match_kinds: identifier
severity: error