aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/utils/diagnostics/vscode.ts
blob: d8b85b7200b3ccb2f55ab87375c831c80fac2a70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import * as vscode from 'vscode';

/** Compares two `vscode.Diagnostic`s for equality */
export function areDiagnosticsEqual(
    left: vscode.Diagnostic,
    right: vscode.Diagnostic
): boolean {
    return (
        left.source === right.source &&
        left.severity === right.severity &&
        left.range.isEqual(right.range) &&
        left.message === right.message
    );
}