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

Commit

Permalink
fix(language-server-ruby): pass valid filenames to RuboCop and Reek
Browse files Browse the repository at this point in the history
Without extraneous single quotes.

Closes #719.
  • Loading branch information
FooBarWidget committed Mar 25, 2021
1 parent 7b5b602 commit 18d5a00
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 18d5a00

Please sign in to comment.