SwiftSyntaxCorrectableRule
public protocol SwiftSyntaxCorrectableRule : CorrectableRule, SwiftSyntaxRule
A SwiftLint CorrectableRule that performs its corrections using a SwiftSyntax SyntaxRewriter
.
-
makeRewriter(file:
Default implementation) Produce a
ViolationsSyntaxRewriter
for the given file.Default Implementation
Declaration
Swift
func makeRewriter(file: SwiftLintFile) -> ViolationsSyntaxRewriter<ConfigurationType>?
Parameters
file
The file for which to produce the rewriter.
Return Value
A
ViolationsSyntaxRewriter
for the given file. May benil
in which case the rule visitor’s collectedviolationCorrections
will be used. -
correct(file:
Extension method) Declaration
Swift
func correct(file: SwiftLintFile) -> [Correction]