Skip to content

fix(redundant_self): allow self in os.Logger privacy interpolations#6642

Open
leno23 wants to merge 2 commits into
realm:mainfrom
leno23:fix/redundant-self-logger-privacy
Open

fix(redundant_self): allow self in os.Logger privacy interpolations#6642
leno23 wants to merge 2 commits into
realm:mainfrom
leno23:fix/redundant-self-logger-privacy

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

Fixes #6542

Test plan

  • Added non-triggering example for Logger + privacy interpolation
  • CI rule tests pass

Made with Cursor

leno23 added 2 commits May 17, 2026 22:51
Skip redundant_self when explicit self appears in labeled arguments such as
`privacy:` inside string interpolations, which require explicit capture.

Fixes realm#6542
@SwiftLintBot
Copy link
Copy Markdown

19 Messages
📖 Building this branch resulted in a binary size of 27639.18 KiB vs 27639.02 KiB when built on main (0% larger).
📖 Linting Aerial with this PR took 0.81 s vs 0.83 s on main (2% faster).
📖 Linting Alamofire with this PR took 1.15 s vs 1.14 s on main (0% slower).
📖 Linting Brave with this PR took 7.43 s vs 7.42 s on main (0% slower).
📖 Linting DuckDuckGo with this PR took 29.94 s vs 29.89 s on main (0% slower).
📖 Linting Firefox with this PR took 12.68 s vs 12.65 s on main (0% slower).
📖 Linting Kickstarter with this PR took 8.68 s vs 8.64 s on main (0% slower).
📖 Linting Moya with this PR took 0.46 s vs 0.45 s on main (2% slower).
📖 Linting NetNewsWire with this PR took 2.92 s vs 2.91 s on main (0% slower).
📖 Linting Nimble with this PR took 0.71 s vs 0.69 s on main (2% slower).
📖 Linting PocketCasts with this PR took 8.2 s vs 8.31 s on main (1% faster).
📖 Linting Quick with this PR took 0.45 s vs 0.43 s on main (4% slower).
📖 Linting Realm with this PR took 3.09 s vs 3.08 s on main (0% slower).
📖 Linting Sourcery with this PR took 1.91 s vs 1.94 s on main (1% faster).
📖 Linting Swift with this PR took 4.85 s vs 4.83 s on main (0% slower).
📖 Linting SwiftLintPerformanceTests with this PR took 0.35 s vs 0.35 s on main (0% slower).
📖 Linting VLC with this PR took 1.28 s vs 1.27 s on main (0% slower).
📖 Linting Wire with this PR took 19.3 s vs 19.32 s on main (0% faster).
📖 Linting WordPress with this PR took 13.08 s vs 13.05 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.

redundant_self false positive with Logger

2 participants