From 4cf2810533aa2380cdd17f7254676bfe8c3dc3e8 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Sun, 13 Dec 2020 02:01:04 +0300 Subject: [PATCH] disable comments evaluation for redundant_boolean_condition rule --- xcode/.swiftlint.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/xcode/.swiftlint.yml b/xcode/.swiftlint.yml index 9a86a55..60816cc 100644 --- a/xcode/.swiftlint.yml +++ b/xcode/.swiftlint.yml @@ -220,6 +220,26 @@ custom_rules: 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." severity: error + match_kinds: + - argument + - attribute.builtin + - attribute.id + - buildconfig.id + - buildconfig.keyword + - 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: name: "Redundant Ternary Operator"