From f197e13e28e873d7f062fb572d8fa7bf95e7ed2a Mon Sep 17 00:00:00 2001 From: Liam Barry Allan Date: Wed, 3 Aug 2022 16:59:28 -0400 Subject: [PATCH] Fix to linter not working in web Signed-off-by: Liam Barry Allan --- src/extension.js | 2 ++ src/vscode/LinterWorker.js | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/extension.js b/src/extension.js index e83c2f79..e3e45a45 100644 --- a/src/extension.js +++ b/src/extension.js @@ -34,10 +34,12 @@ function activate(context) { if (languageEnabled) { languageWorker = new LanguageWorker(context); + Output.write(`vscode-rpgle language tools enabled.`); } if (linterEnabled) { linterWorker = new LinterWorker(context); + Output.write(`vscode-rpgle linter enabled.`); } registerColumnAssist(context); diff --git a/src/vscode/LinterWorker.js b/src/vscode/LinterWorker.js index eaeeb2d3..d1ca3414 100644 --- a/src/vscode/LinterWorker.js +++ b/src/vscode/LinterWorker.js @@ -16,7 +16,8 @@ const { Parser } = require(`../parser`); const lintFile = { member: `vscode,rpglint`, streamfile: `.vscode/rpglint.json`, - file: `.vscode/rpglint.json` + file: `.vscode/rpglint.json`, + 'vscode-vfs': `.vscode/rpglint.json` }; module.exports = class LinterWorker { @@ -39,7 +40,7 @@ module.exports = class LinterWorker { const instance = getInstance(); const editor = vscode.window.activeTextEditor; - if (editor && editor.document.uri.scheme === `file`) { + if (editor && [`file`, `vscode-vfs`].includes(editor.document.uri.scheme)) { const workspaces = vscode.workspace.workspaceFolders; if (workspaces && workspaces.length > 0) { const linter = await vscode.workspace.findFiles(`**/.vscode/rpglint.json`, null, 1);