From d48fceaf48781d02768e145a98a384e410e9acc8 Mon Sep 17 00:00:00 2001 From: Hongli Lai Date: Thu, 25 Mar 2021 13:37:10 +0100 Subject: [PATCH] fix(language-server-ruby): use linters from workspace root Closes #717. --- packages/language-server-ruby/src/Linter.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/language-server-ruby/src/Linter.ts b/packages/language-server-ruby/src/Linter.ts index 9255a4a27..79ddd2209 100644 --- a/packages/language-server-ruby/src/Linter.ts +++ b/packages/language-server-ruby/src/Linter.ts @@ -1,4 +1,3 @@ -import path from 'path'; import { URI } from 'vscode-uri'; import { iif, from, forkJoin, of, Observable } from 'rxjs'; import { map, mergeMap, switchMap } from 'rxjs/operators'; @@ -40,7 +39,7 @@ function getLinter( if (!linter) return new NullLinter(`attempted to lint with unsupported linter: ${name}`); const lintConfig: RubyCommandConfiguration = typeof config.lint[name] === 'object' ? config.lint[name] : {}; - const executionRoot = path.dirname(URI.parse(document.uri).fsPath); + const executionRoot = URI.parse(config.workspaceFolderUri).fsPath; const linterConfig: LinterConfig = { env, executionRoot,