Skip to content

fix(line_length): ignore macro declarations with function setting#6646

Open
leno23 wants to merge 2 commits into
realm:mainfrom
leno23:fix/line-length-ignore-macro-declarations
Open

fix(line_length): ignore macro declarations with function setting#6646
leno23 wants to merge 2 commits into
realm:mainfrom
leno23:fix/line-length-ignore-macro-declarations

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

  • Extends ignores_function_declarations to cover MacroDeclSyntax lines
  • Fixes false positives on long freestanding macro declarations

Fixes #5648

Test plan

  • Added triggering/non-triggering examples based on the issue report
  • CI rule tests pass

Made with Cursor

leno23 added 2 commits May 17, 2026 23:11
When `ignores_function_declarations` is enabled, also skip line length
violations on macro declaration signatures such as freestanding macros.

Fixes realm#5648
@SwiftLintBot
Copy link
Copy Markdown

19 Messages
📖 Building this branch resulted in a binary size of 27639.15 KiB vs 27639.02 KiB when built on main (0% larger).
📖 Linting Aerial with this PR took 0.18 s vs 0.19 s on main (5% faster).
📖 Linting Alamofire with this PR took 0.22 s vs 0.19 s on main (15% slower).
📖 Linting Brave with this PR took 0.89 s vs 0.88 s on main (1% slower).
📖 Linting DuckDuckGo with this PR took 3.86 s vs 3.85 s on main (0% slower).
📖 Linting Firefox with this PR took 1.62 s vs 1.59 s on main (1% slower).
📖 Linting Kickstarter with this PR took 1.04 s vs 1.02 s on main (1% slower).
📖 Linting Moya with this PR took 0.17 s vs 0.12 s on main (41% slower).
📖 Linting NetNewsWire with this PR took 0.39 s vs 0.41 s on main (4% faster).
📖 Linting Nimble with this PR took 0.18 s vs 0.18 s on main (0% slower).
📖 Linting PocketCasts with this PR took 1.08 s vs 1.07 s on main (0% slower).
📖 Linting Quick with this PR took 0.1 s vs 0.12 s on main (16% faster).
📖 Linting Realm with this PR took 0.43 s vs 0.42 s on main (2% slower).
📖 Linting Sourcery with this PR took 0.36 s vs 0.33 s on main (9% slower).
📖 Linting Swift with this PR took 0.49 s vs 0.49 s on main (0% slower).
📖 Linting SwiftLintPerformanceTests with this PR took 3.86 s vs 3.89 s on main (0% faster).
📖 Linting VLC with this PR took 0.24 s vs 0.28 s on main (14% faster).
📖 Linting Wire with this PR took 2.17 s vs 2.17 s on main (0% slower).
📖 Linting WordPress with this PR took 1.59 s vs 1.59 s on main (0% slower).

Generated by 🚫 Danger

Comment thread CHANGELOG.md
[leno23](https://github.com/leno23)
[#5269](https://github.com/realm/SwiftLint/issues/5269)

* Fix `unused_enumerated` false positives when offset and element are used in
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Too many entries …

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.

Macro exclusion for line_length missing

3 participants