-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.swiftlint.yml
72 lines (71 loc) · 1.78 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
disabled_rules:
- force_cast
- identifier_name
- opening_brace
- large_tuple
- type_name
- unowned_variable_capture
- line_length
- multiple_closures_with_trailing_closure
- multiline_arguments
- trailing_comma
excluded:
- "**/R.generated.swift"
- R.generated.swift
- Packages
- .build
- build
- .idea
- .swiftpm
- "**/Package.swift"
- "**/SnapshotHelper.swift"
- fastlane
- cleema-kit
- ReSurge
opt_in_rules:
- empty_string
- last_where
- flatmap_over_map_reduce
- anyobject_protocol
- closure_spacing
- literal_expression_end_indentation
- multiline_arguments
- unowned_variable_capture
- unneeded_parentheses_in_closure_argument
nesting:
type_level: 2
identifier_name:
excluded:
- ID
- id
- x
- y
- z
custom_rules:
# force_https: # From https://github.com/Twigz/Game
# name: "Force HTTPS over HTTP"
# regex: '((?i)http(?!s))'
# match_kinds: string
# message: "HTTPS should be favored over HTTP"
# severity: warning
double_space: # From https://github.com/IBM-Swift/Package-Builder
include: "*.swift"
name: "Double space"
regex: '([a-z,A-Z] \s+)'
message: "Double space between keywords"
match_kinds: keyword
severity: warning
auto_generated_leftovers:
regex: 'func [^\n]*\{\n(\s*super\.[^\n]*\n(\s*\/\/[^\n]*\n)*|(\s*\/\/[^\n]*\n)+)\s*\}'
message: "Delete auto-generated functions that you don't use"
comments_space: # From https://github.com/brandenr/swiftlintconfig
name: "Space After Comment"
regex: '(^ *//\w+)'
message: "There should be a space after //"
severity: warning
short_timeout:
include: "*Tests.swift"
name: "Short timeout"
message: "Please do not use too short timeouts"
regex: "defaultTimeout ="
severity: error