fix(lint): use String#endsWith in the Swift extractor (#846)

oxlint --deny-warnings flags /Error$/ as a warning, so every main CI run has failed since Swift support landed.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jeff
2026-09-26 21:59:02 +08:00
committed by GitHub
co-authored by Cursor
parent 46ffa96f2c
commit e0bf2e967d
@@ -58,7 +58,7 @@ export function extractSwift(files: CodeCollectedFile[]): CodeFact[] {
}
// --- Errors ---
if (typeDecl && /Error$/u.test(typeDecl[2])) {
if (typeDecl && typeDecl[2].endsWith("Error")) {
facts.push(makeFact("error", typeDecl[2], file.relativePath, lineNumber, line, "INFERRED"));
}