Skip to content

Commit 581bd73

Browse files
committed
extension level sorting omitted
Signed-off-by: Ritabrata Ghosh <76sonali40@gmail.com>
1 parent 2eefb66 commit 581bd73

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

vscode/src/extension.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -227,26 +227,6 @@ function handleDocumentSave(document: vscode.TextDocument): void {
227227
}
228228
}
229229

230-
/**
231-
* Sort the Linting Errors by line location
232-
*/
233-
function sortLintErrorsByLocation(errors: LintError[]): LintError[] {
234-
return [...errors].sort((a, b) => {
235-
if (!a.position && !b.position) return 0;
236-
if (!a.position) return 1;
237-
if (!b.position) return -1;
238-
239-
const [aLine, aColumn] = a.position;
240-
const [bLine, bColumn] = b.position;
241-
242-
if (aLine !== bLine) {
243-
return aLine - bLine;
244-
}
245-
246-
return aColumn - bColumn;
247-
});
248-
}
249-
250230
/**
251231
* Update the panel content with current file analysis
252232
*/
@@ -333,11 +313,6 @@ async function updatePanelContent(): Promise<void> {
333313

334314
const lintResult = parseLintResult(lintOutput);
335315

336-
if (lintResult.errors && lintResult.errors.length > 0) {
337-
// TODO: Consider moving lint diagnostic ordering to the jsonschema CLI
338-
lintResult.errors = sortLintErrorsByLocation(lintResult.errors);
339-
}
340-
341316
const parseErrors = hasJsonParseErrors(lintResult, metaschemaResult);
342317

343318
const finalState: PanelState = {

0 commit comments

Comments
 (0)