SubstitutionCorrectableASTRule

public protocol SubstitutionCorrectableASTRule : ASTRule, SubstitutionCorrectableRule

A SubstitutionCorrectableRule that is also an ASTRule.

  • Returns the NSString-based NSRanges to be replaced in the specified file.

    Declaration

    Swift

    func violationRanges(in file: SwiftLintFile, kind: KindType,
                         dictionary: SourceKittenDictionary) -> [NSRange]

    Parameters

    file

    The file in which to find ranges of violations for this rule.

    kind

    The kind of token being recursed over.

    dictionary

    The dictionary for an AST subset to validate.

    Return Value

    The NSString-based NSRanges to be replaced in the specified file.

  • violationRanges(in:) Extension method

    Declaration

    Swift

    func violationRanges(in file: SwiftLintFile) -> [NSRange]