update swiftlint config
This commit is contained in:
parent
e2f85337c0
commit
bd2138f58d
|
|
@ -65,6 +65,7 @@ opt_in_rules:
|
||||||
- identical_operands
|
- identical_operands
|
||||||
- overridden_super_call
|
- overridden_super_call
|
||||||
- unowned_variable_capture
|
- unowned_variable_capture
|
||||||
|
- comment_spacing
|
||||||
|
|
||||||
# metrics
|
# metrics
|
||||||
|
|
||||||
|
|
@ -187,26 +188,12 @@ custom_rules:
|
||||||
regex: '(?!\n)[^ \n]+ {2,}.+'
|
regex: '(?!\n)[^ \n]+ {2,}.+'
|
||||||
message: "Remove excess empty spaces"
|
message: "Remove excess empty spaces"
|
||||||
severity: warning
|
severity: warning
|
||||||
match_kinds:
|
excluded_match_kinds:
|
||||||
- argument
|
- comment
|
||||||
- attribute.builtin
|
- comment.mark
|
||||||
- attribute.id
|
- comment.url
|
||||||
- buildconfig.id
|
- doccomment
|
||||||
- buildconfig.keyword
|
- doccomment.field
|
||||||
- identifier
|
|
||||||
- keyword
|
|
||||||
- number
|
|
||||||
- objectliteral
|
|
||||||
- parameter
|
|
||||||
- placeholder
|
|
||||||
# - string # all except string literals
|
|
||||||
# - comment # and comments
|
|
||||||
# - comment.mark
|
|
||||||
# - comment.url
|
|
||||||
# - doccomment
|
|
||||||
# - doccomment.field
|
|
||||||
- string_interpolation_anchor
|
|
||||||
- typeidentifier
|
|
||||||
|
|
||||||
getter_setter_style:
|
getter_setter_style:
|
||||||
name: "Wrong getter/setter code style"
|
name: "Wrong getter/setter code style"
|
||||||
|
|
@ -221,26 +208,12 @@ custom_rules:
|
||||||
regex: "(== true)|(== false)|(!= true)|(!= false)"
|
regex: "(== true)|(== false)|(!= true)|(!= false)"
|
||||||
message: "Comparing a boolean to true is redundant (use `?? false` for optionals), and `!`-syntax is preferred over comparing to false."
|
message: "Comparing a boolean to true is redundant (use `?? false` for optionals), and `!`-syntax is preferred over comparing to false."
|
||||||
severity: error
|
severity: error
|
||||||
match_kinds:
|
excluded_match_kinds:
|
||||||
- argument
|
- comment
|
||||||
- attribute.builtin
|
- comment.mark
|
||||||
- attribute.id
|
- comment.url
|
||||||
- buildconfig.id
|
- doccomment
|
||||||
- buildconfig.keyword
|
- doccomment.field
|
||||||
- identifier
|
|
||||||
- keyword
|
|
||||||
- number
|
|
||||||
- objectliteral
|
|
||||||
- parameter
|
|
||||||
- placeholder
|
|
||||||
# - string # all except string literals
|
|
||||||
# - comment # and comments
|
|
||||||
# - comment.mark
|
|
||||||
# - comment.url
|
|
||||||
# - doccomment
|
|
||||||
# - doccomment.field
|
|
||||||
- string_interpolation_anchor
|
|
||||||
- typeidentifier
|
|
||||||
|
|
||||||
redundant_ternary_operator:
|
redundant_ternary_operator:
|
||||||
name: "Redundant Ternary Operator"
|
name: "Redundant Ternary Operator"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue