Skip to content

feat: add command line rule exclusions - #6856

Draft
aryansk wants to merge 1 commit into
realm:mainfrom
aryansk:codex/issue-6831-disable-rules
Draft

feat: add command line rule exclusions#6856
aryansk wants to merge 1 commit into
realm:mainfrom
aryansk:codex/issue-6831-disable-rules

Conversation

@aryansk

@aryansk aryansk commented Aug 3, 2026

Copy link
Copy Markdown

Fixes #6831.

Adds a repeatable --disable-rule <rule> option to both lint and analyze. The exclusions are applied after configuration resolution, so they work with normal configuration files, --enable-all-rules, and --only-rule without changing the configuration file.

Validation:

  • swift test --parallel (1,089 tests in 374 suites)
  • focused commandLineDisabledRules test
  • generated lint --help includes --disable-rule
  • strict SwiftLint lint on changed Swift files
  • git diff --check

@SwiftLintBot

Copy link
Copy Markdown
19 Messages
📖 Building this branch resulted in a binary size of 28426.4 KiB vs 28425.27 KiB when built on main (0% larger).
📖 Linting Aerial with this PR took 0.65 s vs 0.64 s on main (1% slower).
📖 Linting Alamofire with this PR took 0.92 s vs 0.94 s on main (2% faster).
📖 Linting Brave with this PR took 5.98 s vs 6.0 s on main (0% faster).
📖 Linting DuckDuckGo with this PR took 27.44 s vs 27.33 s on main (0% slower).
📖 Linting Firefox with this PR took 10.7 s vs 10.67 s on main (0% slower).
📖 Linting Kickstarter with this PR took 7.32 s vs 7.22 s on main (1% slower).
📖 Linting Moya with this PR took 0.35 s vs 0.36 s on main (2% faster).
📖 Linting NetNewsWire with this PR took 2.4 s vs 2.42 s on main (0% faster).
📖 Linting Nimble with this PR took 0.55 s vs 0.55 s on main (0% slower).
📖 Linting PocketCasts with this PR took 6.87 s vs 6.87 s on main (0% slower).
📖 Linting Quick with this PR took 0.34 s vs 0.33 s on main (3% slower).
📖 Linting Realm with this PR took 2.8 s vs 2.82 s on main (0% faster).
📖 Linting Sourcery with this PR took 1.62 s vs 1.57 s on main (3% slower).
📖 Linting Swift with this PR took 4.27 s vs 4.25 s on main (0% slower).
📖 Linting SwiftLintPerformanceTests with this PR took 0.16 s vs 0.16 s on main (0% slower).
📖 Linting VLC with this PR took 1.25 s vs 1.24 s on main (0% slower).
📖 Linting Wire with this PR took 15.43 s vs 15.42 s on main (0% slower).
📖 Linting WordPress with this PR took 9.74 s vs 9.77 s on main (0% faster).

Generated by 🚫 Danger

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.

Add CLI option to disable rules

2 participants