mirror of
https://github.com/Tencent/teamai-cli.git
synced 2026-10-02 03:14:40 +08:00
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:
@@ -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"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user