mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-11 09:08:32 +08:00
Initialize rubocop variables in one place
This commit is contained in:
@@ -1,19 +1,5 @@
|
||||
" Set this option to change Rubocop options.
|
||||
if !exists('g:ale_ruby_rubocop_options')
|
||||
" let g:ale_ruby_rubocop_options = '--lint'
|
||||
let g:ale_ruby_rubocop_options = ''
|
||||
endif
|
||||
|
||||
if !exists('g:ale_ruby_rubocop_executable')
|
||||
let g:ale_ruby_rubocop_executable = 'rubocop'
|
||||
endif
|
||||
|
||||
function! ale#fixers#rubocop#GetExecutable(buffer) abort
|
||||
return ale#Var(a:buffer, 'ruby_rubocop_executable')
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#rubocop#GetCommand(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'ruby_rubocop_executable')
|
||||
let l:executable = ale#handlers#rubocop#GetExecutable(a:buffer)
|
||||
let l:exec_args = l:executable =~? 'bundle$'
|
||||
\ ? ' exec rubocop'
|
||||
\ : ''
|
||||
|
||||
Reference in New Issue
Block a user