added new swiftlint rules

This commit is contained in:
Maxim Sorokin 2020-04-10 13:45:26 +03:00
parent 9dee92ef6f
commit 9b759003ff
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ custom_rules:
boolean_redundant_condition:
name: "Redundant Boolean Condition"
regex: "(== true)|(== false)|(!= true)|(!= false)||(\\? true \\: false)|(\\? false \\: true)"
regex: "(== true)|(== false)|(!= true)|(!= false)|(\\? true \\: false)|(\\? false \\: true)"
message: "Comparing a boolean to true is redundant (use `?? false` for optionals), and `!`-syntax is preferred over comparing to false."
severity: error