Take the rubocop filename from the buffer number given to the function

This commit is contained in:
w0rp 2017-02-05 22:32:38 +00:00
parent 0a14bbe78d
commit 9d85590421

View File

@ -34,10 +34,10 @@ function! ale_linters#ruby#rubocop#Handle(buffer, lines) abort
return l:output return l:output
endfunction endfunction
function! ale_linters#ruby#rubocop#GetCommand(_buffer) abort function! ale_linters#ruby#rubocop#GetCommand(buffer) abort
return 'rubocop --format emacs --force-exclusion ' . return 'rubocop --format emacs --force-exclusion ' .
\ g:ale_ruby_rubocop_options . \ g:ale_ruby_rubocop_options .
\ ' --stdin ' . expand('%') \ ' --stdin ' . bufname(a:buffer)
endfunction endfunction
" Set this option to change Rubocop options. " Set this option to change Rubocop options.