summaryrefslogtreecommitdiff
path: root/ale_linters/ruby/rubocop.vim
diff options
context:
space:
mode:
authorRyan Rosenblum <ryan.rosenblum@gmail.com>2018-08-24 11:33:59 -0400
committerRyan Rosenblum <ryan.rosenblum@gmail.com>2018-09-12 16:53:28 -0400
commit9e09b7ca3559e2c14ed2401bb666b441b22dafff (patch)
tree2ef0434865ce0c88bd02489cc756742c63a5c3dd /ale_linters/ruby/rubocop.vim
parent78af99c2566ef8fed443ce253e0de9323b9e5043 (diff)
downloadale-9e09b7ca3559e2c14ed2401bb666b441b22dafff.zip
Update all Ruby linters to work consistently with bundler
Diffstat (limited to 'ale_linters/ruby/rubocop.vim')
-rw-r--r--ale_linters/ruby/rubocop.vim7
1 files changed, 2 insertions, 5 deletions
diff --git a/ale_linters/ruby/rubocop.vim b/ale_linters/ruby/rubocop.vim
index 777f457a..dce27e3c 100644
--- a/ale_linters/ruby/rubocop.vim
+++ b/ale_linters/ruby/rubocop.vim
@@ -3,11 +3,8 @@
function! ale_linters#ruby#rubocop#GetCommand(buffer) abort
let l:executable = ale#handlers#rubocop#GetExecutable(a:buffer)
- let l:exec_args = l:executable =~? 'bundle$'
- \ ? ' exec rubocop'
- \ : ''
- return ale#Escape(l:executable) . l:exec_args
+ return l:executable
\ . ' --format json --force-exclusion '
\ . ale#Var(a:buffer, 'ruby_rubocop_options')
\ . ' --stdin ' . ale#Escape(expand('#' . a:buffer . ':p'))
@@ -55,7 +52,7 @@ endfunction
call ale#linter#Define('ruby', {
\ 'name': 'rubocop',
-\ 'executable_callback': 'ale#handlers#rubocop#GetExecutable',
+\ 'executable_callback': ale#VarFunc('ruby_rubocop_executable'),
\ 'command_callback': 'ale_linters#ruby#rubocop#GetCommand',
\ 'callback': 'ale_linters#ruby#rubocop#Handle',
\})