mirror of https://github.com/dense-analysis/ale
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:
parent
a9c650cd05
commit
a82ead0dc1
|
@ -43,9 +43,8 @@ endif
|
||||||
call ale#linter#Define('ruby', {
|
call ale#linter#Define('ruby', {
|
||||||
\ 'name': 'rubocop',
|
\ 'name': 'rubocop',
|
||||||
\ 'executable': 'rubocop',
|
\ 'executable': 'rubocop',
|
||||||
\ 'command': 'rubocop --format emacs --stdin '
|
\ 'command': 'rubocop --format emacs --force-exclusion --stdin '
|
||||||
\ . g:ale_ruby_rubocop_options
|
\ . g:ale_ruby_rubocop_options
|
||||||
\ . ' _',
|
\ . ' %s',
|
||||||
\ 'callback': 'ale_linters#ruby#rubocop#Handle',
|
\ 'callback': 'ale_linters#ruby#rubocop#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue