Pass extra rubocop options in the middle instead, and fix the Vader test so it can be run multiple times in Vim

This commit is contained in:
w0rp committed 2017-08-10 14:57:30 +01:00
1 parent 0c26e8945c
commit 34aa3437e0
2 files changed
+9 -5

No files matched your search

+3 -2
View File
@@ -4,11 +4,12 @@ function! ale#fixers#rubocop#GetCommand(buffer) abort
\ ? ' 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
\ . (!empty(l:config) ? ' --config ' . ale#Escape(l:config) : '')
\ . ' --auto-correct %t '
\ . ale#Var(a:buffer, 'ruby_rubocop_options')
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' --auto-correct %t'
endfunction