Merge pull request #187 from TouchInstinct/feature/swiftlint_rule_closure_style

New closure style rule
This commit is contained in:
Loupehope 2020-05-14 12:04:40 +03:00 committed by GitHub
commit a6a9e8a523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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: