forked from SwifterSwift/SwifterSwift
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.swiftlint.yml
57 lines (53 loc) · 1.56 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
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
# transient, fixed by swiftformat
- colon
- leading_whitespace
- opening_brace
- switch_case_alignment
- trailing_comma
- trailing_newline
- trailing_whitespace
- vertical_whitespace
excluded:
- vendor # Folder created by bundle install command that we run on CI
identifier_name:
excluded:
- x
- y
- z