Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for crashing linter #33

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ function validate(lint, resolve) {
.catch(function(ex){
dc.delete(editor.document.uri);
const diagnostics = [];
let range; // TODO
let p1 = new vscode.Position(0,0);
let p2 = new vscode.Position(0,0);
let range = new vscode.Range(p1,p2); // TODO
let error = new vscode.Diagnostic(range, ex.message, vscode.DiagnosticSeverity.Error);
error.source = 'openapi-lint';
diagnostics.push(error);
Expand Down Expand Up @@ -191,7 +193,9 @@ function optionallyValidateOnSave(document) {
.catch(ex => {
dc.delete(document.uri);
const diagnostics = [];
let range; // TODO
let p1 = new vscode.Position(0,0);
let p2 = new vscode.Position(0,0);
let range = new vscode.Range(p1,p2); // TODO
diagnostics.push(new vscode.Diagnostic(range, ex.message, vscode.DiagnosticSeverity.Error));
for (let warning of options.warnings||[]) {
let warn = new vscode.Diagnostic(range, warning.message, vscode.DiagnosticSeverity.Warning);
Expand Down