This repository has been archived by the owner on Apr 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.swiftlint.yml
75 lines (68 loc) · 1.77 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
disabled_rules:
- nesting
- vertical_parameter_alignment
opt_in_rules:
- attributes
- closure_end_indentation
- closure_spacing
- conditional_returns_on_newline
- empty_count
- explicit_init
- fatal_error_message
- file_header
- first_where
- force_unwrapping
- implicit_return
- implicitly_unwrapped_optional
- number_separator
- object_literal
- operator_usage_whitespace
- overridden_super_call
- private_outlet
- prohibited_super_call
- redundant_nil_coalescing
- sorted_imports
- switch_case_on_newline
excluded:
- ".build"
- "Packages"
file_header:
required_pattern: |
\/\/
\/\/ .*?\.swift
\/\/ GitHub Scanner
\/\/
\/\/ Created by .*? on \d{1,2}\/\d{1,2}\/\d{4}\.
\/\/ Copyright © \d{4} ustwo Fampany Ltd\. All rights reserved\.
\/\/
number_separator:
minimum_length: 5
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