summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-08-10 14:57:30 +0100
committerw0rp <devw0rp@gmail.com>2017-08-10 14:57:30 +0100
commit34aa3437e0fc062215020b423bdf57da449e9400 (patch)
tree2897d39ad66cd6ee60ff81352103c1e118127fa5 /autoload
parent0c26e8945cc662fb41ad3b2a808516a4501d1e07 (diff)
downloadale-34aa3437e0fc062215020b423bdf57da449e9400.zip
Pass extra rubocop options in the middle instead, and fix the Vader test so it can be run multiple times in Vim
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/fixers/rubocop.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/autoload/ale/fixers/rubocop.vim b/autoload/ale/fixers/rubocop.vim
index 557b7594..35569b19 100644
--- a/autoload/ale/fixers/rubocop.vim
+++ b/autoload/ale/fixers/rubocop.vim
@@ -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