missing_docs warns about actors not documenting public protocol properties
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 19.7k
- Forks
- 2.3k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- Updated SwiftLint to the latest version
- I searched for existing GitHub issues
Describe the bug
If you use the "actor" keyword, it implicitly conforms to the "Actor" protocol, but SwiftLint still warns about not documenting public properties from the Actor protocol. For example, if you provide a public "unownedExecutor", it warns about it not documenting it. But if you explicitly conform to "Actor" then it doesn't warn.
It seems like SwiftLint should treat actors as if they explicitly specified they conform to the "Actor" protocol.
Generates warnings
/// Documentation for MyActor.
public final actor MyActor {
public nonisolated var unownedExecutor: UnownedSerialExecutor { ... } // Warns here
}
No warnings
/// Documentation for MyActor.
public final actor MyActor: Actor {
public nonisolated var unownedExecutor: UnownedSerialExecutor { ... }
}
Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint
Environment
- SwiftLint version (run
swiftlint versionto be sure)? 0.53.0 - Installation method used (Homebrew, CocoaPods, building from source, etc)? homebrew
- Paste your configuration file:
opt_in_rules:
- missing_docs
-
Are you using nested configurations?
No -
Which Xcode version are you using (check
xcodebuild -version)?
Invoking SwiftLint directly. -
Do you have a sample that shows the issue?
Pasted above.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the provided actor examples and swiftlint lint, then inspect the missing_docs rule's handling of protocol conformances. Done means an actor's public unownedExecutor is treated like the same property on an explicitly Actor-conforming type, without changing unrelated documentation warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100