Add options variable for ruby-rubocop
This commit is contained in:
parent
f5a4e11894
commit
5636626da1
@ -34,10 +34,18 @@ function! ale_linters#ruby#rubocop#Handle(buffer, lines)
|
|||||||
return l:output
|
return l:output
|
||||||
endfunction
|
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', {
|
call ale#linter#Define('ruby', {
|
||||||
\ 'name': 'rubocop',
|
\ 'name': 'rubocop',
|
||||||
\ 'executable': 'rubocop',
|
\ 'executable': 'rubocop',
|
||||||
\ 'command': 'rubocop --format emacs --stdin _',
|
\ 'command': 'rubocop --format emacs --stdin '
|
||||||
|
\ . g:ale_ruby_rubocop_options
|
||||||
|
\ . ' _',
|
||||||
\ 'callback': 'ale_linters#ruby#rubocop#Handle',
|
\ 'callback': 'ale_linters#ruby#rubocop#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
||||||
|
10
doc/ale.txt
10
doc/ale.txt
@ -631,6 +631,16 @@ Python 3, you may want to set >
|
|||||||
after making sure it's installed for the appropriate Python versions (e.g.
|
after making sure it's installed for the appropriate Python versions (e.g.
|
||||||
`python3 -m pip install --user flake8`).
|
`python3 -m pip install --user flake8`).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
4.18. ruby-rubocop *ale-linter-options-ruby-rubocop*
|
||||||
|
|
||||||
|
g:ale_ruby_rubocop_options *g:ale_ruby_rubocop_options*
|
||||||
|
|
||||||
|
Type: |String|
|
||||||
|
Default: `''`
|
||||||
|
|
||||||
|
This variable can be change to modify flags given to rubocop.
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
5. Linter Integration Notes *ale-linter-integration*
|
5. Linter Integration Notes *ale-linter-integration*
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user