diff options
author | Po Shan Cheah <pcheah@icetec.com> | 2016-12-01 12:28:27 -0500 |
---|---|---|
committer | Po Shan Cheah <pcheah@icetec.com> | 2016-12-01 12:28:27 -0500 |
commit | 5636626da199811e4be6e848e46edccb17950d3a (patch) | |
tree | 05142bf18baf76dd84c2351da390e86b49aeceb9 /ale_linters/ruby | |
parent | f5a4e1189480170f70a252b0b4e697763f19a0e8 (diff) | |
download | ale-5636626da199811e4be6e848e46edccb17950d3a.zip |
Add options variable for ruby-rubocop
Diffstat (limited to 'ale_linters/ruby')
-rw-r--r-- | ale_linters/ruby/rubocop.vim | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ale_linters/ruby/rubocop.vim b/ale_linters/ruby/rubocop.vim index fcc6f8bd..a7ed1f99 100644 --- a/ale_linters/ruby/rubocop.vim +++ b/ale_linters/ruby/rubocop.vim @@ -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', \}) |