From a82ead0dc151e63c7bbf8d04712a42b2d5b85f12 Mon Sep 17 00:00:00 2001 From: Derek Prior Date: Fri, 27 Jan 2017 16:29:58 -0500 Subject: [PATCH] Enable Rubocop to exclude files based on config When using `--stdin`, Rubocop requires that you also pass the associated file name. ALE was previously passing `_` as the filename. By passing the actual relative path to the file and enabling the `--force-exclusion` option, we can get Rubocop to respect excluded files in the configuration. Closes #197 --- ale_linters/ruby/rubocop.vim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ale_linters/ruby/rubocop.vim b/ale_linters/ruby/rubocop.vim index fad02128..69d26d33 100644 --- a/ale_linters/ruby/rubocop.vim +++ b/ale_linters/ruby/rubocop.vim @@ -43,9 +43,8 @@ endif call ale#linter#Define('ruby', { \ 'name': 'rubocop', \ 'executable': 'rubocop', -\ 'command': 'rubocop --format emacs --stdin ' +\ 'command': 'rubocop --format emacs --force-exclusion --stdin ' \ . g:ale_ruby_rubocop_options -\ . ' _', +\ . ' %s', \ 'callback': 'ale_linters#ruby#rubocop#Handle', \}) -