EmptyLinesVisitor

public final class EmptyLinesVisitor : SyntaxVisitor

Visitor to find lines that are totally empty (no code, no comments).

  • Lines that are totally empty (contain neither code nor comments).

    Declaration

    Swift

    public var emptyLines: Set<Int> { get }
  • Initializer.

    Declaration

    Swift

    public init(locationConverter: SourceLocationConverter)

    Parameters

    locationConverter

    The location converter to use for mapping positions to line numbers.

  • Compute empty lines in the given file.

    Declaration

    Swift

    public static func emptyLines(in file: SwiftLintFile) -> Set<Int>

    Parameters

    file

    The SwiftLint file to analyze.

    Return Value

    A set of line numbers that are empty.

  • Declaration

    Swift

    override public func visit(_ token: TokenSyntax) -> SyntaxVisitorContinueKind