Skip to content

Fix missing_docs false positives for implicit actor requirements - #6855

Draft
ZHUOLIN0928 wants to merge 2 commits into
realm:mainfrom
ZHUOLIN0928:codex/5422-actor-missing-docs
Draft

Fix missing_docs false positives for implicit actor requirements#6855
ZHUOLIN0928 wants to merge 2 commits into
realm:mainfrom
ZHUOLIN0928:codex/5422-actor-missing-docs

Conversation

@ZHUOLIN0928

Copy link
Copy Markdown

Fixes #5422

Summary

  • Ignore the compiler-provided unownedExecutor requirement when checking an actor's documented members.
  • Keep the exemption limited to a direct actor member with a single unownedExecutor binding.
  • Add a non-triggering example for the reported implicit actor conformance case.

Validation

  • swift build --disable-sandbox --product swiftlint passed.
  • Built SwiftLint with --disable-sourcekit reported no missing_docs violation for the implicit actor example, while a regular struct's undocumented unownedExecutor still produced the expected violations.
  • swift test --disable-sandbox --filter MissingDocsRuleTests could not run because the installed CommandLineTools environment cannot resolve XCTest while building SwiftSyntax test support.

@SwiftLintBot

SwiftLintBot commented Aug 3, 2026

Copy link
Copy Markdown
19 Messages
📖 Building this branch resulted in a binary size of 28425.41 KiB vs 28425.27 KiB when built on main (0% larger).
📖 Linting Aerial with this PR took 0.66 s vs 0.64 s on main (3% slower).
📖 Linting Alamofire with this PR took 0.92 s vs 0.93 s on main (1% faster).
📖 Linting Brave with this PR took 6.07 s vs 6.06 s on main (0% slower).
📖 Linting DuckDuckGo with this PR took 27.02 s vs 27.02 s on main (0% slower).
📖 Linting Firefox with this PR took 10.84 s vs 10.85 s on main (0% faster).
📖 Linting Kickstarter with this PR took 7.28 s vs 7.35 s on main (0% faster).
📖 Linting Moya with this PR took 0.38 s vs 0.37 s on main (2% slower).
📖 Linting NetNewsWire with this PR took 2.43 s vs 2.42 s on main (0% slower).
📖 Linting Nimble with this PR took 0.58 s vs 0.57 s on main (1% slower).
📖 Linting PocketCasts with this PR took 6.95 s vs 6.99 s on main (0% faster).
📖 Linting Quick with this PR took 0.36 s vs 0.35 s on main (2% slower).
📖 Linting Realm with this PR took 2.87 s vs 2.89 s on main (0% faster).
📖 Linting Sourcery with this PR took 1.57 s vs 1.59 s on main (1% faster).
📖 Linting Swift with this PR took 4.31 s vs 4.33 s on main (0% faster).
📖 Linting SwiftLintPerformanceTests with this PR took 0.16 s vs 0.16 s on main (0% slower).
📖 Linting VLC with this PR took 1.23 s vs 1.28 s on main (3% faster).
📖 Linting Wire with this PR took 15.59 s vs 15.6 s on main (0% faster).
📖 Linting WordPress with this PR took 9.83 s vs 9.86 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.

missing_docs warns about actors not documenting public protocol properties

2 participants