summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-02-05 22:32:38 +0000
committerw0rp <devw0rp@gmail.com>2017-02-05 22:32:38 +0000
commit9d855904211f60f7d93765ce24b736d364858261 (patch)
tree6d372a9a482e9d16fa3e82bf3a234b56f7cf1346
parent0a14bbe78d18bc79a3b3bfd7792fc4c827de1728 (diff)
downloadale-9d855904211f60f7d93765ce24b736d364858261.zip
Take the rubocop filename from the buffer number given to the function
-rw-r--r--ale_linters/ruby/rubocop.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/ale_linters/ruby/rubocop.vim b/ale_linters/ruby/rubocop.vim
index 006dfae2..5e5e2cbc 100644
--- a/ale_linters/ruby/rubocop.vim
+++ b/ale_linters/ruby/rubocop.vim
@@ -34,10 +34,10 @@ function! ale_linters#ruby#rubocop#Handle(buffer, lines) abort
return l:output
endfunction
-function! ale_linters#ruby#rubocop#GetCommand(_buffer) abort
+function! ale_linters#ruby#rubocop#GetCommand(buffer) abort
return 'rubocop --format emacs --force-exclusion ' .
\ g:ale_ruby_rubocop_options .
- \ ' --stdin ' . expand('%')
+ \ ' --stdin ' . bufname(a:buffer)
endfunction
" Set this option to change Rubocop options.