swiftlang/swift-format

AllPublicDeclarationsHaveDocumentation doesn't check enums, actors, or nested declarations

Closed this issue · 1 comments

public enum Foo {}

public actor Bar {}

/// Comment
public struct X {
    public func baz() {}
}

Foo, Bar, and baz are all public declarations, but no warning will be emitted for missing a doc comment. The same issue also exists with BeginDocumentationCommentWithOneLineSummary and UseSynthesizedInitializer (nested structs will be skipped).

Synced to Apple’s issue tracker as rdar://132401334