From 31e2d9e3e0ae72dfa04fa310751aa8ebc0063d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yunus=20G=C3=BCng=C3=B6r?= Date: Fri, 25 Mar 2022 15:30:01 +0100 Subject: [PATCH] Use linter.command for formating too --- packages/language-server-ruby/src/formatters/RuboCop.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/language-server-ruby/src/formatters/RuboCop.ts b/packages/language-server-ruby/src/formatters/RuboCop.ts index 3655551e6..9cbd9db64 100644 --- a/packages/language-server-ruby/src/formatters/RuboCop.ts +++ b/packages/language-server-ruby/src/formatters/RuboCop.ts @@ -7,8 +7,12 @@ export default class RuboCop extends BaseFormatter { protected FORMATTED_OUTPUT_REGEX = new RegExp(`^${this.FORMATTED_OUTPUT_DELIMITER}$`, 'm'); get cmd(): string { - const command = 'rubocop'; - return this.isWindows() ? command + '.bat' : command; + if (this.lintConfig.command) { + return this.lintConfig.command; + } else { + const command = 'rubocop'; + return this.isWindows() ? command + '.bat' : command; + } } get args(): string[] {