Merge pull request #561 from meunierd/override-rubocop-executable

Allow overriding rubocop executable.
This commit is contained in:
w0rp authored and GitHub committed 2017-05-18 09:19:23 +01:00
commit 2fd4db91ce
3 files changed
+47 -2

No files matched your search

@@ -0,0 +1,19 @@
Before:
runtime ale_linters/ruby/rubocop.vim
Execute(Executable should default to rubocop):
AssertEqual
\ '''rubocop'' --format emacs --force-exclusion --stdin ''dummy.py''',
\ ale_linters#ruby#rubocop#GetCommand(bufnr(''))
Execute(Should be able to set a custom executable):
let g:ale_ruby_rubocop_executable = 'bin/rubocop'
AssertEqual
\ '''bin/rubocop'' --format emacs --force-exclusion --stdin ''dummy.py''',
\ ale_linters#ruby#rubocop#GetCommand(bufnr(''))
Execute(Setting bundle appends 'exec rubocop'):
let g:ale_ruby_rubocop_executable = 'path to/bundle'
AssertEqual
\ '''path to/bundle'' exec rubocop --format emacs --force-exclusion --stdin ''dummy.py''',
\ ale_linters#ruby#rubocop#GetCommand(bufnr(''))