forked from SwifterSwift/SwifterSwift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.swiftlint.yml
47 lines (44 loc) · 1.36 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
custom_rules:
missing_swifterswift_prefix:
included: ".*\\.swift"
excluded: ".*Tests\\.swift"
name: "Missing SwifterSwift: prefix"
regex: "\\n\\n(\\s*///\\s(?!SwifterSwift:\\s)\\w+[^\\n]*$)"
match_kinds:
- doccomment
message: "Doc string should always start with the SwifterSwift: prefix"
severity: warning
unnecessary_type:
name: "Unnecessary Type"
regex: '(?sm)[ \ta-zA-Z0-9]?(?:let|var){1} [ \ta-zA-Z0-9]+?:[ \t]+?([a-zA-Z0-9]+?)[\t ]+?=[\t ]?\1'
message: "Type Definition Not Needed"
severity: warning
comments_space:
name: "Space After Comment"
regex: '(//\w+|///\w+)'
message: "There should be a space between the start of a comment and the first character."
severity: warning
match_kinds:
- comment
- doccomment
- doccomment.field
empty_commented_line:
name: "Empty Commented Out Line"
regex: '(\t+| +)//$'
message: "Remove useless comment lines or use /* format */"
severity: warning
get_prefixed_function:
name: "Get prefixed function"
regex: '(?-smxi)(func get[A-Z0-9][\w]+?(\())'
message: "You should not prefix your functions with the word get."
severity: warning
disabled_rules:
- line_length
- file_length
excluded:
- vendor # Folder created by bundle install command that we run on CI
identifier_name:
excluded:
- x
- y
- z