superfluous_disable_command in a multiline comment generates multiple false alarms for x is not a valid SwiftLint rule
#4798
Labels
bug
Unexpected and reproducible misbehavior.
New Issue Checklist
Describe the bug
Given the following input:
superfluous_disable_command
will generate multiple false positives.#4791 fixes the case of this that occurs in Aerial purely by chance (see the osstools output on that PR), because the problem stretch of code there happens to contain the word
all
which is interpreted as suppress all rules. However #4791 does not fix the problem for the above case, or any other cases in general.Complete output when running SwiftLint, including the stack trace and command used
Environment
SwiftLint version (run
swiftlint version
to be sure)? 0.50.3Installation method used (Homebrew, CocoaPods, building from source, etc)? Homebrew
Paste your configuration file: none
Are you using nested configurations? no
Which Xcode version are you using (check
xcodebuild -version
)?echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
to quickly test if your example is really demonstrating the issue. If your example is more
complex, you can use
swiftlint lint --path [file here] --no-cache --enable-all-rules
.See description above.
The text was updated successfully, but these errors were encountered: