Skip to content

Commit 4e7c2c7

Browse files
committed
update Rules
1 parent 4438a24 commit 4e7c2c7

1 file changed

Lines changed: 18 additions & 9 deletions

File tree

SwiftLint/swiftlint.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ opt_in_rules:
7373
- multiline_arguments
7474
- multiline_function_chains
7575
- multiline_literal_brackets
76-
- multiline_parameters_brackets
7776
- object_literal
7877
- overridden_super_call
7978
- redundant_type_annotation
@@ -82,10 +81,7 @@ opt_in_rules:
8281
- toggle_bool
8382
- unowned_variable_capture
8483
- unused_import
85-
- vertical_parameter_alignment_on_call
8684
- vertical_whitespace_closing_braces
87-
- convenience_type
88-
- number_separator
8985
- single_test_class
9086
- strong_iboutlet
9187

@@ -181,11 +177,6 @@ custom_rules:
181177
- placeholder
182178
- parameter
183179
- attribute.builtin
184-
single_line_body:
185-
name: "Single Line Body"
186-
regex: '(?i-sm)((if|while|do|for).? \{(?!\n|.?(s|g)et).+?\}\n)'
187-
message: "Single line bodies are not allowed"
188-
severity: warning
189180
empty_line_after_guard:
190181
name: "Empty Line After Guard"
191182
regex: '(^ *guard[ a-zA-Z0-9=?.\(\),><!]*\{[ a-zA-Z0-9=?.\(\),><!]*\}\n *(?!(?:return|guard))\S+)'
@@ -256,6 +247,24 @@ custom_rules:
256247
regex: '(\[[a-zA-Z0-9]+?:[a-zA-Z0-9]+?\])'
257248
message: "Missing space. use [DataType: DataType]."
258249
severity: warning
250+
missing_space_around_operator:
251+
name: "Missing Space Around Operator"
252+
regex: '[\w)]+(\+|-|\*|/)[\w(]+'
253+
message: "Missing space around operator"
254+
severity: warning
255+
match_kinds:
256+
- argument
257+
- attribute.builtin
258+
- attribute.id
259+
- buildconfig.id
260+
- buildconfig.keyword
261+
- identifier
262+
- keyword
263+
- number
264+
- objectliteral
265+
- parameter
266+
- placeholder
267+
- typeidentifier
259268
missing_empty_line:
260269
name: "Missing Empty Line"
261270
regex: '(?-smxi)(\}\n)([ \t]*?)([^\n\}\t ])'

0 commit comments

Comments
 (0)