Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #720 from FooBarWidget/fix/linter-args
Browse files Browse the repository at this point in the history
Pass valid filenames to RuboCop and Reek
  • Loading branch information
wingrunr21 authored Sep 27, 2021
2 parents da0d5d4 + 18d5a00 commit 0b6cd1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/language-server-ruby/src/linters/Reek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class Reek extends BaseLinter {

get args(): string[] {
const documentPath = URI.parse(this.document.uri);
return ['-f', 'json', '--stdin-filename', `'${documentPath.fsPath}'`];
return ['-f', 'json', '--stdin-filename', documentPath.fsPath];
}

protected processResults(data): Diagnostic[] {
Expand Down
2 changes: 1 addition & 1 deletion packages/language-server-ruby/src/linters/RuboCop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default class RuboCop extends BaseLinter {

get args(): string[] {
const documentPath = URI.parse(this.document.uri);
let args = ['-s', `'${documentPath.fsPath}'`, '-f', 'json'];
let args = ['-s', documentPath.fsPath, '-f', 'json'];
if (this.lintConfig.rails) args.push('-R');
if (this.lintConfig.forceExclusion) args.push('--force-exclusion');
if (this.lintConfig.lint) args.push('-l');
Expand Down

0 comments on commit 0b6cd1c

Please sign in to comment.