-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.swiftlint.yml
43 lines (42 loc) · 1.34 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
only_rules:
- closing_brace
- colon
- comma
- legacy_cggeometry_functions
- legacy_constant
- legacy_constructor
- return_arrow_whitespace
- statement_position
- trailing_newline
- trailing_semicolon
- trailing_whitespace
- custom_rules
custom_rules:
dictionary_colon:
name: "Colon should be stuck to key type"
regex: '\[[A-Za-z\d]+? : [a-zA-Z\d]+?]'
severity: error
use_make_instead_of_create:
name: "Factory methods naming"
regex: 'func create'
message: "Begin names of factory methods with 'make'"
severity: error
no_using_decoder_parameter_name:
name: "Omit aDecoder parameter name"
regex: 'init\?\(coder (?!_:)'
message: "Use init?(coder _: NSCoder) instead"
severity: error
no_class_without_access_and_overridability:
name: "Add access or overridability keyword"
regex: '^class '
message: "If you want to make an overridable class, use explicit internal keyword."
severity: error
access_and_overridability_order:
name: "Access and overridability keywords order"
regex: '^final (public|internal|private|fileprivate) class'
message: "Access keyword should be first, final second"
severity: error
one_newline_after_import:
name: "New line after imports"
regex: "import [A-Za-z]+\n\n\n"
message: "There should be only one new line after import statements"