Skip to content

Commit 257c464

Browse files
zthcristianoc
authored andcommitted
detect warnings configured as errors, and highlight them as actual errors in the editor rather than warnings
1 parent 676a4c5 commit 257c464

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/src/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,9 +538,12 @@ export let parseCompilerLogOutput = (
538538
tag = t.DiagnosticTag.Deprecated;
539539
break;
540540
}
541+
let severity = line.includes("(configured as error)")
542+
? t.DiagnosticSeverity.Error
543+
: t.DiagnosticSeverity.Warning;
541544
parsedDiagnostics.push({
542545
code: Number.isNaN(warningNumber) ? undefined : warningNumber,
543-
severity: t.DiagnosticSeverity.Warning,
546+
severity,
544547
tag: tag,
545548
content: [],
546549
});

0 commit comments

Comments
 (0)