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

Commit 0b6cd1c

Browse files
authored
Merge pull request #720 from FooBarWidget/fix/linter-args
Pass valid filenames to RuboCop and Reek
2 parents da0d5d4 + 18d5a00 commit 0b6cd1c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/language-server-ruby/src/linters/Reek.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class Reek extends BaseLinter {
2727

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

3333
protected processResults(data): Diagnostic[] {

packages/language-server-ruby/src/linters/RuboCop.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default class RuboCop extends BaseLinter {
5858

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

0 commit comments

Comments
 (0)