mirror of
https://github.com/dense-analysis/ale.git
synced 2026-10-14 08:58:55 +08:00
#732 - Use the configuration files when fixing files with rubocop
This commit is contained in:
1 parent
acda19776a
commit
a72c1edfcc
3 files changed
+20
-4
No files matched your search
@@ -3,8 +3,10 @@ function! ale#fixers#rubocop#GetCommand(buffer) abort
|
||||
let l:exec_args = l:executable =~? 'bundle$'
|
||||
\ ? ' exec rubocop'
|
||||
\ : ''
|
||||
let l:config = ale#path#FindNearestFile(a:buffer, '.rubocop.yml')
|
||||
|
||||
return ale#Escape(l:executable) . l:exec_args
|
||||
\ . (!empty(l:config) ? ' --config ' . ale#Escape(l:config) : '')
|
||||
\ . ' --auto-correct %t'
|
||||
|
||||
endfunction
|
||||
|
||||
Reference in new issue
Block a user