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
This commit is contained in:
Derek Prior 2017-01-27 16:29:58 -05:00
parent a9c650cd05
commit a82ead0dc1
No known key found for this signature in database
GPG Key ID: 60D9C7F1019704B4
1 changed files with 2 additions and 3 deletions

View File

@ -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',
\})