realm/SwiftLint

missing_docs warns about actors not documenting public protocol properties

オープン

#5,422 opened on 2024/01/16

 (7 件のコメント) (0 件のリアクション) (0 人の担当者)Swift (2,295 件のフォーク)batch import
enhancementgood first issue

Repository metrics

Stars
 (19,570 個のスター)
PR merge metrics
 (PR metrics pending)

説明

New Issue Checklist

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 version to 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.

コントリビューターガイド