Skip to content

Commit

Permalink
Add missing subscript declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
SimplyDanny committed Nov 11, 2023
1 parent 3a03e7a commit 779f6f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/SwiftLintCore/Visitors/ViolationsSyntaxVisitor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ open class ViolationsSyntaxVisitor<Configuration: RuleConfiguration>: SyntaxVisi

override open func visit(_ node: StructDeclSyntax) -> SyntaxVisitorContinueKind { shallSkip(node) }

override open func visit(_ node: SubscriptDeclSyntax) -> SyntaxVisitorContinueKind { shallSkip(node) }

override open func visit(_ node: VariableDeclSyntax) -> SyntaxVisitorContinueKind { shallSkip(node) }

private func shallSkip(_ node: some DeclSyntaxProtocol) -> SyntaxVisitorContinueKind {
Expand Down Expand Up @@ -82,11 +84,12 @@ public extension Array where Element == any DeclSyntaxProtocol.Type {
ActorDeclSyntax.self,
ClassDeclSyntax.self,
EnumDeclSyntax.self,
FunctionDeclSyntax.self,
ExtensionDeclSyntax.self,
FunctionDeclSyntax.self,
InitializerDeclSyntax.self,
ProtocolDeclSyntax.self,
StructDeclSyntax.self,
SubscriptDeclSyntax.self,
VariableDeclSyntax.self
]

Expand Down

0 comments on commit 779f6f0

Please sign in to comment.