 import Foundation
 import SourceKittenFramework
 
-public struct QuickDiscouragedCallRule: ASTRule, OptInRule, ConfigurationProviderRule {
+public struct QuickDiscouragedCallRule: OptInRule, ConfigurationProviderRule {
     public var configuration = SeverityConfiguration(.warning)
 
     public init() {}

    case beforeSuite
    case afterEach
    case afterSuite
    case it
    case pending

    static let restrictiveKinds: [QuickCallKind] = [.describe, .context, .sharedExamples]
}
// swiftlint:enabled identifier_name

        triggeringExamples: QuickDiscouragedCallRuleExamples.triggeringExamples
    )

    public func validate(file: File) -> [StyleViolation] {
        let testClasses = file.structure.dictionary.substructure.filter {
            return $0.inheritedTypes.contains("QuickSpec") &&
                $0.kind.flatMap(SwiftDeclarationKind.init) == .class
        }

        let specDeclarations = testClasses.flatMap { classDict in
            return classDict.substructure.filter {
                return $0.name == "spec()" && $0.enclosedVarParameters.isEmpty &&
                    $0.enclosedSwiftAttributes.contains("source.decl.attribute.override")
            }
        }

        return specDeclarations.flatMap {
            validate(file: file, dictionary: $0)
        }
    }

    private func validate(file: File, dictionary: [String: SourceKitRepresentable]) -> [StyleViolation] {
        return dictionary.substructure.flatMap { subDict -> [StyleViolation] in
            var violations = validate(file: file, dictionary: subDict)

            if let kindString = subDict.kind,
                let kind = SwiftExpressionKind(rawValue: kindString) {
                violations += validate(file: file, kind: kind, dictionary: subDict)
            }

            return violations
        }
    }

    public func validate(file: File,
                         kind: SwiftExpressionKind,
                         dictionary: [String: SourceKitRepresentable]) -> [StyleViolation] {
