Update all Ruby linters to work consistently with bundler

This commit is contained in:
Ryan Rosenblum committed 2018-09-12 16:53:28 -04:00
1 parent 78af99c256
commit 9e09b7ca35
12 files changed
+111 -39

No files matched your search

+1 -4
View File
@@ -1,12 +1,9 @@
function! ale#fixers#rubocop#GetCommand(buffer) abort
let l:executable = ale#handlers#rubocop#GetExecutable(a:buffer)
let l:exec_args = l:executable =~? 'bundle$'
\ ? ' exec rubocop'
\ : ''
let l:config = ale#path#FindNearestFile(a:buffer, '.rubocop.yml')
let l:options = ale#Var(a:buffer, 'ruby_rubocop_options')
return ale#Escape(l:executable) . l:exec_args
return l:executable
\ . (!empty(l:config) ? ' --config ' . ale#Escape(l:config) : '')
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' --auto-correct %t'