-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.swiftlint.yml
More file actions
103 lines (100 loc) · 2.55 KB
/
.swiftlint.yml
File metadata and controls
103 lines (100 loc) · 2.55 KB
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
99
100
101
102
103
disabled_rules:
- identifier_name #short vars
- type_body_length
- statement_position #}else{
- attributes
- nesting #?
- todo #todo
- file_length
- function_body_length
- trailing_whitespace #xcode default
- cyclomatic_complexity
- pattern_matching_keywords #hz
- override_in_extension #hz
- trailing_comma
- inclusive_language
- redundant_nil_coalescing #intruduces bugs
- function_parameter_count #?
- multiple_closures_with_trailing_closure
- is_disjoint #?
- no_fallthrough_only #?
- notification_center_detachment
- redundant_string_enum_value
- legacy_hashing
- comment_spacing
opt_in_rules:
- closure_end_indentation
- closure_spacing
- explicit_init
- first_where
- joined_default_parameter
- let_var_whitespace
- literal_expression_end_indentation
- nimble_operator
- number_separator
- object_literal
- operator_usage_whitespace
- overridden_super_call
- private_action
- private_outlet
- prohibited_super_call
- quick_discouraged_call
- quick_discouraged_focused_test
- quick_discouraged_pending_test
- single_test_class
- sorted_first_last
- sorted_imports
- unneeded_parentheses_in_closure_argument
- brackets_statment
- closure_inner_space
- brackets_space
excluded:
- Pods
- .build
- LinuxMain.swift
- spark-core/LinuxMain.swift
- "**/Pods"
- spark-database/SparkDatabaseTests
- spark-composer/SparkComposerTests
- spark-body-parser/SmartMailMessageParserTests
- spark-common/SmartMailCommonTests
- spark-searchContacts/SearchContactsTests
- spark-searchContacts/SearchContactsOSXTests
- spark-database/SparkDatabase
- spark-database/SparkDatabaseOSXTests
type_name:
min_length: 1 # only warning
max_length: # warning and error
warning: 40
error: 50
excluded: iPhone # excluded via string
identifier_name:
min_length: # only min_length
error: 1 # only error
excluded: # excluded via string array
- id
- URL
- GlobalAPIKey
line_length: 1000 #160
number_separator:
minimum_length: 5
custom_rules:
brackets_statment:
name: Brackets Statment
message: statments after } shoule be started from new line
regex: \}[ ]*(if|else|catch)
severity: error
brackets_space:
name: Block Opening
message: shoule be whitespace after {
regex: \{(?:\(|\w)
severity: error
match_kinds: # SyntaxKinds to match. optional.
- parameter
- identifier
closure_inner_space:
name: Closure Inner Space
message: closures should have space after {
regex: \{\w+(?:, \w+)* in\b
severity: warning
#TODO todo should have tickect refrence