             case let start = nameOffset + nameLength,
             case let length = bodyOffset - start,
             let range = contents.byteRangeToNSRange(start: start, length: length),
-            let match = pattern.firstMatch(in: file.contents, options: [], range: range)?.rangeAt(1) else {
+            let match = genericTypeRegex.firstMatch(in: file.contents, options: [], range: range)?.rangeAt(1) else {
                 return []
         }
 

        }
    )

    private let pattern = regex("<(\\s*\\w.*?)>")

    public func validateFile(_ file: File,
                             kind: SwiftDeclarationKind,

            "func run(_ options: NoOptions<CommandantError<()>>) {}\n",
            "func foo(_ options: Set<type>) {}\n",
            "func < <T: Comparable>(lhs: T?, rhs: T?) -> Bool\n",
            "func configureWith(data: Either<MessageThread, (project: Project, backing: Backing)>)\n",
            "typealias StringDictionary<T> = Dictionary<String, T>\n",
            "typealias BackwardTriple<T1, T2, T3> = (T3, T2, T1)\n",
            "typealias DictionaryOfStrings<T : Hashable> = Dictionary<T, String>\n"
        ],
        triggeringExamples: [
            "func foo<↓T_Foo>() {}\n",
            "func foo<T, ↓U_Foo>(param: U_Foo) -> T {}\n",
            "func foo<↓\(String(repeating: "T", count: 21))>() {}\n",
            "func foo<↓type>() {}\n",
            "typealias StringDictionary<↓T_Foo> = Dictionary<String, T_Foo>\n",
            "typealias BackwardTriple<T1, ↓T2_Bar, T3> = (T3, T2_Bar, T1)\n",
            "typealias DictionaryOfStrings<↓T_Foo: Hashable> = Dictionary<T, String>\n"
        ] + ["class", "struct", "enum"].flatMap { type in
            [
                "\(type) Foo<↓T_Foo> {}\n",
