Skip to content

Commit

Permalink
fix(language-server-ruby): use linters from workspace root
Browse files Browse the repository at this point in the history
Closes rubyide#717.
  • Loading branch information
FooBarWidget committed Mar 25, 2021
1 parent 7b5b602 commit d48fcea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/language-server-ruby/src/Linter.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit d48fcea

Please sign in to comment.