         ]
     )
 
-    public func validate(file: SwiftLintFile) -> [StyleViolation] {
-        let visitor = UnavailableConditionRuleVisitor(viewMode: .sourceAccurate)
-        return visitor.walk(file: file, handler: \.availabilityChecks).map { check in
-            StyleViolation(
-                ruleDescription: Self.description,
-                severity: configuration.severity,
-                location: Location(
-                    file: file,
-                    byteOffset: ByteCount(check.positionAfterSkippingLeadingTrivia.utf8Offset)),
-                reason: provideViolationReason(for: check)
-            )
-        }
-    }
-
-    private func provideViolationReason(for check: SyntaxProtocol) -> String {
-        switch check {
-        case is AvailabilityConditionSyntax:
-            return "Use #unavailable instead of #available with an empty body."
-        case is UnavailabilityConditionSyntax:
-            return "Use #available instead of #unavailable with an empty body."
-        default:
-            queuedFatalError("Unknown availability check type.")
-        }
+    public func makeVisitor(file: SwiftLintFile) -> ViolationsSyntaxVisitor? {
+        UnavailableConditionRuleVisitor(viewMode: .sourceAccurate)
     }
 }
 
-private final class UnavailableConditionRuleVisitor: SyntaxVisitor {
-    private(set) var availabilityChecks: [SyntaxProtocol] = []
-
+private final class UnavailableConditionRuleVisitor: ViolationsSyntaxVisitor {
     override func visitPost(_ node: IfStmtSyntax) {
         guard node.body.statements.withoutTrivia().isEmpty else {
             return

import SourceKittenFramework
import SwiftSyntax

public struct UnavailableConditionRule: ConfigurationProviderRule, SourceKitFreeRule {
    public var configuration = SeverityConfiguration(.warning)

    public init() {}

        }
        return false
    }

    private func provideViolationReason(for check: SyntaxProtocol) -> String {
        switch check {
        case is AvailabilityConditionSyntax:
            return "Use #unavailable instead of #available with an empty body."
        case is UnavailabilityConditionSyntax:
            return "Use #available instead of #unavailable with an empty body."
        default:
            queuedFatalError("Unknown availability check type.")
        }
    }
}
