Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the superfluous_disable_command when running the analyzer #5522

Conversation

mildm8nnered
Copy link
Collaborator

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
Copy link

SwiftLintBot commented Apr 1, 2024

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

Generated by 🚫 Danger

@mildm8nnered mildm8nnered force-pushed the mildm8nnered-enable-superfluous-disable-command-when-analyzing branch from 1d48f3b to 5c557cb Compare April 2, 2024 12:28
Copy link
Collaborator

@SimplyDanny SimplyDanny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good. Thanks!

Can the proper functionally somehow be proven by a test?

CHANGELOG.md Outdated Show resolved Hide resolved
@mildm8nnered
Copy link
Collaborator Author

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.

@SimplyDanny SimplyDanny merged commit dfb0982 into realm:main Apr 3, 2024
12 checks passed
@mildm8nnered mildm8nnered deleted the mildm8nnered-enable-superfluous-disable-command-when-analyzing branch April 3, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants