Skip to content

Commit

Permalink
Downgrade flycheck severity to warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
gebner committed Jul 1, 2024
1 parent be20652 commit 01d903f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,9 @@ export class DocumentState {
if (this.fstar_lax) {
// Add diagnostics from the lax position that are after the part processed by the full process.
const lastPos = mkPosition(this.fstar.results.fragments.findLast(f => !f.invalidatedThroughEdits && f.ok !== undefined)?.range?.end || [1, 1]);
diags.push(...this.fstar_lax.results.diagnostics.filter(d => posLe(lastPos, d.range.start)));
diags.push(...this.fstar_lax.results.diagnostics.filter(d => posLe(lastPos, d.range.start))
// Downgrade flycheck severity to warning
.map(diag => ({...diag, source: 'F* flycheck', ...(diag.severity === DiagnosticSeverity.Error && { severity: DiagnosticSeverity.Warning })})));
}

void this.server.connection.sendDiagnostics({
Expand Down Expand Up @@ -767,6 +769,7 @@ export class DocumentProcess {
return {
message: diag.message,
severity: ideErrorLevelAsDiagnosticSeverity(diag.level),
source: 'F*',
range: mainRange,
relatedInformation: ranges.map(rng => ({
location: {
Expand Down

0 comments on commit 01d903f

Please sign in to comment.