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

Pass valid filenames to RuboCop and Reek #720

Merged
merged 1 commit into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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