Merge pull request #187 from TouchInstinct/feature/swiftlint_rule_closure_style
New closure style rule
This commit is contained in:
commit
a6a9e8a523
|
|
@ -227,6 +227,12 @@ custom_rules:
|
|||
message: "Returning a boolean as true is redundant, and `!`-syntax is preferred over returning as false."
|
||||
severity: error
|
||||
|
||||
single_line_closure:
|
||||
name: "Single line closure"
|
||||
regex: '\{([^\n]*\[[^\]]+\][^\n]*)?([^\n]*[a-zA-Z]+(, (_|[a-zA-Z]+))*)? in [^\n]+'
|
||||
message: "Too complex expression for single line closure. Improve readability by making it multiline."
|
||||
severity: error
|
||||
|
||||
# Rx
|
||||
|
||||
unused_map_parameter:
|
||||
|
|
|
|||
Loading…
Reference in New Issue