This repository has been archived by the owner on Apr 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.swiftlint.yml
83 lines (76 loc) · 1.87 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
80
81
82
83
disabled_rules:
- line_length
- nesting
- identifier_name
opt_in_rules:
- attributes
- closure_spacing
- conditional_returns_on_newline
- empty_count
- explicit_init
- fatal_error_message
- file_header
- first_where
- implicit_return
- implicitly_unwrapped_optional
- number_separator
- object_literal
- overridden_super_call
- private_outlet
- prohibited_super_call
- redundant_nil_coalescing
- sorted_imports
- switch_case_on_newline
excluded:
- Pods
file_header:
required_pattern: |
\/\/
\/\/ .*?\.swift
\/\/ Brunel
\/\/
\/\/ Created by .*? on \d{1,2}\/\d{1,2}\/\d{4}\.
\/\/ Copyright © \d{4} ustwo Fampany Ltd\. All rights reserved\.
\/\/
attributes:
always_on_same_line:
- '@IBAction'
- '@NSManaged'
- '@nonobjc'
- '@objc'
line_length: 110
trailing_whitespace:
ignores_empty_lines: true
ignores_comments: true
type_body_length:
- 300 # warning
- 400 # error
vertical_whitespace:
max_empty_lines: 2
custom_rules:
# pragma mark style
marks_empty_space:
name: "Marks"
regex: "(//MARK)"
message: "There should be an empty space between // and the MARK."
severity: warning
marks_style:
name: "Marks"
regex: "(// MARK: -?[a-zA-Z0-9])"
message: "Marks should follow the following structure: // MARK: - Comment."
severity: warning
# comments style
comments_empty_space:
name: "Comments"
regex: "(//[a-zA-Z0-9])"
match_kinds:
- comment
message: "There should be an empty space between // and the comment."
severity: warning
comments_empty_line_after:
name: "Comments"
regex: "([^\n]\n^ *[a-zA-Z0-9{])"
match_kinds:
- comment
message: "There should be an empty line after a comment."
severity: warning