ViolationsSyntaxRewriter
open class ViolationsSyntaxRewriter<Configuration> : SyntaxRewriter where Configuration : RuleConfiguration
A SwiftSyntax SyntaxRewriter that produces absolute positions where corrections were applied.
-
A rule’s configuration.
Declaration
Swift
public let configuration: Configuration -
The file from which the traversed syntax tree stems from.
Declaration
Swift
public let file: SwiftLintFile -
A converter of positions in the traversed source file.
Declaration
Swift
public lazy var locationConverter: SourceLocationConverter { get set } -
The regions in the traversed file that are disabled by a command.
Declaration
Swift
public lazy var disabledRegions: [SourceRange] { get set } -
The number of corrections made by the rewriter.
Declaration
Swift
public var numberOfCorrections: Int -
Initializer for a
ViolationsSyntaxRewriter.Declaration
Swift
@inlinable public init(configuration: Configuration, file: SwiftLintFile)Parameters
configurationConfiguration of a rule.
fileFile from which the syntax tree stems from.
-
Declaration
Swift
override open func visitAny(_ node: Syntax) -> Syntax?
View on GitHub
Install in Dash