-
Notifications
You must be signed in to change notification settings - Fork 4
/
.swiftlint.yml
executable file
·98 lines (94 loc) · 2.16 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
disabled_rules: # rule identifiers to exclude from running
- cyclomatic_complexity
- inclusive_language
- line_length
- type_body_length
opt_in_rules: # some rules are only opt-in
- contains_over_range_nil_comparison
- discouraged_optional_boolean
- empty_count
- empty_collection_literal
- empty_string
- fatal_error_message
- force_unwrapping
- modifier_order
- sorted_imports
- unneeded_parentheses_in_closure_argument
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- closure_spacing
- redundant_type_annotation
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Pods
- Vendor
- build
- SwiftGit2
- Package.swift
- Shared/
comma: error
contains_over_range_nil_comparison: error
discouraged_optional_boolean: warning
duplicate_imports: error
empty_collection_literal: error
empty_count: error
empty_string: error
fatal_error_message: error
file_length:
warning: 1000
error: 1500
force_cast: warning
force_try: warning
force_unwrapping: warning
function_body_length:
warning: 100
error: 150
identifier_name:
max_length:
warning: 55
error: 60
min_length:
error: 3
allowed_symbols: [_]
excluded:
- id
- db
- rs
- vc
- on
- me
- to
- n
- i
large_tuple:
warning: 3
error: 4
legacy_constant: error
legacy_constructor: error
nesting:
type_level: 2
statement_position:
statement_mode: default
severity: error
trailing_newline: error
trailing_semicolon: error
trailing_whitespace:
ignores_empty_lines: true
type_name:
allowed_symbols: [_]
max_length:
warning: 60
error: 65
excluded:
- T
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle)
custom_rules:
comments_space:
name: "Space After Comment"
regex: (^ *//\w+)
message: "There should be a space after //"
severity: error
multiple_empty_lines:
name: "Multiple Empty Lines"
regex: ((?:\s*\n){3,})
message: "There are too many line breaks"
severity: error