Array

public extension Array where Element == Example
extension Array: AcceptableByConfigurationElement where Element: AcceptableByConfigurationElement
public extension Array where Element == SwiftLintSyntaxToken
public extension Array where Element == ReasonedRuleViolation
public extension Array where Element == any DeclSyntaxProtocol.Type

Available where Element == Example

Available where Element: AcceptableByConfigurationElement

Available where Element == SwiftLintSyntaxToken

  • The kinds for these tokens.

    Declaration

    Swift

    var kinds: [SyntaxKind] { get }

Available where Element == ReasonedRuleViolation

  • Add a violation at the specified position using the default description and severity.

    Declaration

    Swift

    mutating func append(_ position: AbsolutePosition)

    Parameters

    position

    The position for the violation to append.

  • Add a violation and the correction at the specified position using the default description and severity.

    Declaration

    Swift

    mutating func append(at position: AbsolutePosition, correction: ReasonedRuleViolation.ViolationCorrection? = nil)

    Parameters

    position

    The position for the violation to append.

    correction

    An optional correction to be applied when running with --fix.

  • Add violations for the specified positions using the default description and severity.

    Declaration

    Swift

    mutating func append(contentsOf positions: [AbsolutePosition])

    Parameters

    positions

    The positions for the violations to append.

Available where Element == anyDeclSyntaxProtocol.Type

  • all

    All visitable declaration syntax types.

    Declaration

    Swift

    static let all: `Self`
  • All declarations except for the specified ones.

    Declaration

    Swift

    static func allExcept(_ declarations: Element...) -> Array<Element>

    Parameters

    declarations

    The declarations to exclude from all declarations.

    Return Value

    All declarations except for the specified ones.