 import SwiftSyntax
 
-public struct DiscouragedNoneNameRule: SourceKitFreeRule, OptInRule, ConfigurationProviderRule {
+public struct DiscouragedNoneNameRule: SwiftSyntaxRule, OptInRule, ConfigurationProviderRule {
     public var configuration = SeverityConfiguration(.warning)
 
     public static var description = RuleDescription(


    public init() {}

    public func validate(file: SwiftLintFile) -> [StyleViolation] {
        Visitor(viewMode: .sourceAccurate)
            .walk(file: file, handler: \.violationPositions)
            .sorted { $0.position < $1.position }
            .map { position, reason in
                StyleViolation(
                    ruleDescription: Self.description,
                    severity: configuration.severity,
                    location: Location(file: file, position: position),
                    reason: reason
                )
            }
    }
}

private extension DiscouragedNoneNameRule {
    final class Visitor: SyntaxVisitor {
        private(set) var violationPositions: [(position: AbsolutePosition, reason: String)] = []

        override func visitPost(_ node: EnumCaseElementSyntax) {
            let emptyParams = node.associatedValue?.parameterList.isEmpty ?? true
            if node.identifier.isNone, emptyParams {
                violationPositions.append((node.positionAfterSkippingLeadingTrivia, reason(type: "`case`")))
            }
        }


                    continue
                }

                violations.append(ReasonedRuleViolation(
                    position: node.positionAfterSkippingLeadingTrivia,
                    reason: reason(type: type)
                ))
                return
            }
        }
