From 34aa3437e0fc062215020b423bdf57da449e9400 Mon Sep 17 00:00:00 2001 From: w0rp Date: Thu, 10 Aug 2017 14:57:30 +0100 Subject: Pass extra rubocop options in the middle instead, and fix the Vader test so it can be run multiple times in Vim --- autoload/ale/fixers/rubocop.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'autoload') 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 -- cgit v1.2.3