realm / SwiftLint

A tool to enforce Swift style and conventions.
https://realm.github.io/SwiftLint
MIT License
18.46k stars 2.2k forks source link

Enable the superfluous_disable_command when running the analyzer #5522

Closed mildm8nnered closed 3 months ago

mildm8nnered commented 3 months ago

Addresses #4792. Surprisingly easy.

superfluous_disable_command ignores rules that aren't enabled, so you can swiftlint:disable analyzer rules, and they will be ignored when linting. Similarly, when analyzing, superfluous_disable_command will ignore any non analyzer rules.

SwiftLintBot commented 3 months ago
17 Messages
:book: Linting Aerial with this PR took 1.29s vs 1.24s on main (4% slower)
:book: Linting Alamofire with this PR took 1.81s vs 1.79s on main (1% slower)
:book: Linting Brave with this PR took 10.4s vs 10.35s on main (0% slower)
:book: Linting DuckDuckGo with this PR took 5.51s vs 5.54s on main (0% faster)
:book: Linting Firefox with this PR took 12.88s vs 12.93s on main (0% faster)
:book: Linting Kickstarter with this PR took 12.58s vs 12.52s on main (0% slower)
:book: Linting Moya with this PR took 0.69s vs 0.68s on main (1% slower)
:book: Linting NetNewsWire with this PR took 3.96s vs 3.96s on main (0% slower)
:book: Linting Nimble with this PR took 1.03s vs 1.02s on main (0% slower)
:book: Linting PocketCasts with this PR took 10.16s vs 10.18s on main (0% faster)
:book: Linting Quick with this PR took 0.45s vs 0.45s on main (0% slower)
:book: Linting Realm with this PR took 6.32s vs 6.38s on main (0% faster)
:book: Linting Sourcery with this PR took 3.14s vs 3.14s on main (0% slower)
:book: Linting Swift with this PR took 6.29s vs 6.29s on main (0% slower)
:book: Linting VLC with this PR took 1.67s vs 1.67s on main (0% slower)
:book: Linting Wire with this PR took 23.53s vs 23.54s on main (0% faster)
:book: Linting WordPress with this PR took 15.24s vs 15.29s on main (0% faster)

Generated by :no_entry_sign: Danger

mildm8nnered commented 3 months ago

Very good. Thanks!

Can proper functionally somehow be proven by a test?

Managed to work out how to get the analyzer to run and to find a reasonable spot for it, along with the other superfluous disable command tests.