Add options variable for ruby-rubocop

This commit is contained in:
Po Shan Cheah
2016-12-01 12:28:27 -05:00
parent f5a4e11894
commit 5636626da1
2 changed files with 19 additions and 1 deletions

View File

@@ -34,10 +34,18 @@ function! ale_linters#ruby#rubocop#Handle(buffer, lines)
return l:output
endfunction
" 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
call ale#linter#Define('ruby', {
\ 'name': 'rubocop',
\ 'executable': 'rubocop',
\ 'command': 'rubocop --format emacs --stdin _',
\ 'command': 'rubocop --format emacs --stdin '
\ . g:ale_ruby_rubocop_options
\ . ' _',
\ 'callback': 'ale_linters#ruby#rubocop#Handle',
\})