summaryrefslogtreecommitdiff
path: root/ale_linters/ruby/rubocop.vim
diff options
context:
space:
mode:
authorDerek Prior <derekprior@gmail.com>2017-01-27 16:29:58 -0500
committerDerek Prior <derekprior@gmail.com>2017-01-27 16:29:58 -0500
commita82ead0dc151e63c7bbf8d04712a42b2d5b85f12 (patch)
tree1885b05962f6b48c4c010261416e9b76df8cb23c /ale_linters/ruby/rubocop.vim
parenta9c650cd05d5680a5e691eefb86e46bd6604ea1b (diff)
downloadale-a82ead0dc151e63c7bbf8d04712a42b2d5b85f12.zip
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
Diffstat (limited to 'ale_linters/ruby/rubocop.vim')
-rw-r--r--ale_linters/ruby/rubocop.vim5
1 files 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',
\})
-