Skip to content

Commit d1e2f1b

Browse files
committed
Add function limitDiagnostics
1 parent 240766a commit d1e2f1b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

server/src/server.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,13 @@ function walkTree(
271271
}
272272
}
273273

274+
function limitDiagnostics(
275+
diagnostics: Diagnostic[],
276+
maxNumberOfProblems: number
277+
): Diagnostic[] {
278+
return diagnostics.slice(0, maxNumberOfProblems);
279+
}
280+
274281
// ===== Enhanced Validation =====
275282
export function validateScrapScript(
276283
text: string,

0 commit comments

Comments
 (0)