CodeBlockVisitor
open class CodeBlockVisitor<Configuration> : ViolationsSyntaxVisitor<Configuration> where Configuration : RuleConfiguration
A visitor that collects style violations for all available code blocks.
-
Declaration
Swift
@inlinable override public init(configuration: Configuration, file: SwiftLintFile)
-
Declaration
Swift
override open func visitPost(_ node: AccessorDeclSyntax)
-
Declaration
Swift
override open func visitPost(_ node: ActorDeclSyntax)
-
Declaration
Swift
override open func visitPost(_ node: CatchClauseSyntax)
-
Declaration
Swift
override open func visitPost(_ node: ClassDeclSyntax)
-
Declaration
Swift
override open func visitPost(_ node: ClosureExprSyntax)
-
Declaration
Swift
override open func visitPost(_ node: DeferStmtSyntax)
-
Declaration
Swift
override open func visitPost(_ node: DoStmtSyntax)
-
Declaration
Swift
override open func visitPost(_ node: EnumDeclSyntax)
-
Declaration
Swift
override open func visitPost(_ node: ExtensionDeclSyntax)
-
Declaration
Swift
override open func visitPost(_ node: FunctionDeclSyntax)
-
Declaration
Swift
override open func visitPost(_ node: ForStmtSyntax)
-
Declaration
Swift
override open func visitPost(_ node: GuardStmtSyntax)
-
Declaration
Swift
override open func visitPost(_ node: IfExprSyntax)
-
Declaration
Swift
override open func visitPost(_ node: InitializerDeclSyntax)
-
Declaration
Swift
override open func visitPost(_ node: PatternBindingSyntax)
-
Declaration
Swift
override open func visitPost(_ node: PrecedenceGroupDeclSyntax)
-
Declaration
Swift
override open func visitPost(_ node: ProtocolDeclSyntax)
-
Declaration
Swift
override open func visitPost(_ node: RepeatStmtSyntax)
-
Declaration
Swift
override open func visitPost(_ node: StructDeclSyntax)
-
Declaration
Swift
override open func visitPost(_ node: SwitchExprSyntax)
-
Declaration
Swift
override open func visitPost(_ node: WhileStmtSyntax)
-
Collects violations for the given braced item. Intended to be specialized by subclasses.
Declaration
Swift
open func collectViolations(for _: (some BracedSyntax)?)
Parameters
bracedItem
The braced item to collect violations for.