Skip to content

Commit b2d25c6

Browse files
authored
Merge pull request #655 from allevato/no-warn-overrides
[AllPublicDeclarationsHaveDocumentation] Fix behavior for `override` methods.
2 parents af66fdc + 1e19a50 commit b2d25c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/SwiftFormat/Rules/AllPublicDeclarationsHaveDocumentation.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ public final class AllPublicDeclarationsHaveDocumentation: SyntaxLintRule {
7777
) {
7878
guard
7979
DocumentationCommentText(extractedFrom: decl.leadingTrivia) == nil,
80-
modifiers.contains(anyOf: [.public, .override])
80+
modifiers.contains(anyOf: [.public]),
81+
!modifiers.contains(anyOf: [.override])
8182
else {
8283
return
8384
}

0 commit comments

Comments
 (0)