ReasonedRuleViolation

public struct ReasonedRuleViolation : Comparable

A violation produced by ViolationsSyntaxVisitors.

  • The violation’s position.

    Declaration

    Swift

    public let position: AbsolutePosition
  • A specific reason for the violation.

    Declaration

    Swift

    public let reason: String?
  • The violation’s severity.

    Declaration

    Swift

    public let severity: ViolationSeverity?
  • Creates a ReasonedRuleViolation.

    Declaration

    Swift

    public init(position: AbsolutePosition, reason: String? = nil, severity: ViolationSeverity? = nil)

    Parameters

    position

    The violations position in the analyzed source file.

    reason

    The reason for the violation if different from the rule’s description.

    severity

    The severity of the violation if different from the rule’s default configured severity.

  • Declaration

    Swift

    public static func < (lhs: `Self`, rhs: `Self`) -> Bool