2017-05-16 15:47:35 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('ruby', 'rubocop')
|
|
|
|
call ale#test#SetFilename('dummy.rb')
|
2017-07-09 21:43:25 +00:00
|
|
|
|
|
|
|
let g:ale_ruby_rubocop_executable = 'rubocop'
|
2018-07-15 17:24:53 +00:00
|
|
|
let g:ale_ruby_rubocop_options = ''
|
2017-07-09 21:43:25 +00:00
|
|
|
|
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-05-16 15:47:35 +00:00
|
|
|
|
|
|
|
Execute(Executable should default to rubocop):
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'rubocop', ale#Escape('rubocop')
|
2020-08-28 18:50:36 +00:00
|
|
|
\ . ' --format json --force-exclusion --stdin %s'
|
2017-05-16 15:47:35 +00:00
|
|
|
|
|
|
|
Execute(Should be able to set a custom executable):
|
|
|
|
let g:ale_ruby_rubocop_executable = 'bin/rubocop'
|
2017-10-05 21:31:00 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'bin/rubocop' , ale#Escape('bin/rubocop')
|
2020-08-28 18:50:36 +00:00
|
|
|
\ . ' --format json --force-exclusion --stdin %s'
|
2017-05-16 15:47:35 +00:00
|
|
|
|
2017-05-17 12:46:47 +00:00
|
|
|
Execute(Setting bundle appends 'exec rubocop'):
|
|
|
|
let g:ale_ruby_rubocop_executable = 'path to/bundle'
|
2017-10-05 21:31:00 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'path to/bundle', ale#Escape('path to/bundle')
|
|
|
|
\ . ' exec rubocop'
|
2020-08-28 18:50:36 +00:00
|
|
|
\ . ' --format json --force-exclusion --stdin %s'
|