Skip to content

Commit

Permalink
clear ast-check diagnostics when no errors are reported
Browse files Browse the repository at this point in the history
  • Loading branch information
Techatrix authored and Vexu committed Oct 27, 2024
1 parent 72540f6 commit 133b167
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/zigCompilerProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ export default class ZigCompilerProvider {
timeout: 60000, // 60 seconds (this is a very high value because 'zig ast-check' is just in time compiled)
});

if (error ?? stderr.length === 0) return;
if (error ?? stderr.length === 0) {
this.astDiagnostics.delete(textDocument.uri);
return;
}

const diagnostics: Record<string, vscode.Diagnostic[] | undefined> = {};
const regex = /(\S.*):(\d*):(\d*): ([^:]*): (.*)/g;
Expand Down

0 comments on commit 133b167

Please sign in to comment.