2017-11-10 04:37:23 -05:00
|
|
|
Before:
|
|
|
|
call ale#test#SetFilename('test.proto')
|
|
|
|
|
|
|
|
After:
|
|
|
|
Restore
|
|
|
|
|
2018-01-06 14:56:28 -05:00
|
|
|
unlet! b:ale_proto_protoc_gen_lint_options
|
|
|
|
|
2017-11-10 04:37:23 -05:00
|
|
|
call ale#linter#Reset()
|
|
|
|
|
|
|
|
Execute(The default command should be correct):
|
|
|
|
AssertEqual
|
|
|
|
\ 'protoc' . ' -I ' . ale#Escape(getcwd()) . ' --lint_out=. ' . '%s',
|
|
|
|
\ ale_linters#proto#protoc_gen_lint#GetCommand(bufnr(''))
|
2018-01-06 14:56:28 -05:00
|
|
|
|
|
|
|
Execute(The callback should include any additional options):
|
|
|
|
let b:ale_proto_protoc_gen_lint_options = '--some-option'
|
|
|
|
|
|
|
|
AssertEqual
|
|
|
|
\ 'protoc' . ' -I ' . ale#Escape(getcwd()) . ' --some-option --lint_out=. ' . '%s',
|
|
|
|
\ ale_linters#proto#protoc_gen_lint#GetCommand(bufnr(''))
|