Skip to content

feat(empty_enum_arguments): add excluded_members configuration#6643

Open
leno23 wants to merge 1 commit into
realm:mainfrom
leno23:feat/empty-enum-arguments-excluded-members
Open

feat(empty_enum_arguments): add excluded_members configuration#6643
leno23 wants to merge 1 commit into
realm:mainfrom
leno23:feat/empty-enum-arguments-excluded-members

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

  • Adds excluded_members rule configuration (set of member names)
  • Skips violations and autocorrect for excluded members (e.g. HealthKit gramUnit)
  • Adds a non-triggering example with configuration

Closes #5269

Test plan

  • Added configured non-triggering example
  • CI rule tests pass (EmptyEnumArgumentsRuleGeneratedTests)

Made with Cursor

Allow opting out specific member names from empty-enum-argument checks and
autocorrect, which avoids breaking APIs such as HealthKit static functions.

Closes realm#5269
@SwiftLintBot
Copy link
Copy Markdown

1 Warning
⚠️ This PR may need tests.
19 Messages
📖 Building this branch resulted in a binary size of 27644.12 KiB vs 27639.02 KiB when built on main (0% larger).
📖 Linting Aerial with this PR took 0.81 s vs 0.81 s on main (0% slower).
📖 Linting Alamofire with this PR took 1.12 s vs 1.1 s on main (1% slower).
📖 Linting Brave with this PR took 7.3 s vs 7.31 s on main (0% faster).
📖 Linting DuckDuckGo with this PR took 29.6 s vs 29.6 s on main (0% slower).
📖 Linting Firefox with this PR took 12.51 s vs 12.48 s on main (0% slower).
📖 Linting Kickstarter with this PR took 8.52 s vs 8.53 s on main (0% faster).
📖 Linting Moya with this PR took 0.47 s vs 0.45 s on main (4% slower).
📖 Linting NetNewsWire with this PR took 2.87 s vs 2.84 s on main (1% slower).
📖 Linting Nimble with this PR took 0.71 s vs 0.68 s on main (4% slower).
📖 Linting PocketCasts with this PR took 8.23 s vs 8.18 s on main (0% slower).
📖 Linting Quick with this PR took 0.45 s vs 0.45 s on main (0% slower).
📖 Linting Realm with this PR took 3.0 s vs 2.98 s on main (0% slower).
📖 Linting Sourcery with this PR took 1.88 s vs 1.87 s on main (0% slower).
📖 Linting Swift with this PR took 4.74 s vs 4.76 s on main (0% faster).
📖 Linting SwiftLintPerformanceTests with this PR took 0.34 s vs 0.31 s on main (9% slower).
📖 Linting VLC with this PR took 1.26 s vs 1.24 s on main (1% slower).
📖 Linting Wire with this PR took 19.1 s vs 19.07 s on main (0% slower).
📖 Linting WordPress with this PR took 12.86 s vs 12.85 s on main (0% slower).

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.

empty_enum_arguments false positive, --fix command breaks code preventing successful compile

2 participants