From 5636626da199811e4be6e848e46edccb17950d3a Mon Sep 17 00:00:00 2001 From: Po Shan Cheah Date: Thu, 1 Dec 2016 12:28:27 -0500 Subject: Add options variable for ruby-rubocop --- ale_linters/ruby/rubocop.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'ale_linters/ruby/rubocop.vim') 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', \}) -- cgit v1.2.3