Fix: Failed to execute rubocop fixer on other machine (#3916)

This commit is contained in:
Yuto Ito
2021-09-23 18:46:16 +09:00
committed by GitHub
parent f8a4c78b5b
commit c9c89a1853
2 changed files with 0 additions and 16 deletions

View File

@@ -21,12 +21,10 @@ endfunction
function! ale#fixers#rubocop#GetCommand(buffer) abort
let l:executable = ale#Var(a:buffer, 'ruby_rubocop_executable')
let l:config = ale#path#FindNearestFile(a:buffer, '.rubocop.yml')
let l:options = ale#Var(a:buffer, 'ruby_rubocop_options')
let l:auto_correct_all = ale#Var(a:buffer, 'ruby_rubocop_auto_correct_all')
return ale#ruby#EscapeExecutable(l:executable, 'rubocop')
\ . (!empty(l:config) ? ' --config ' . ale#Escape(l:config) : '')
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . (l:auto_correct_all ? ' --auto-correct-all' : ' --auto-correct')
\ . ' --force-exclusion --stdin %s'