2017-11-10 09:37:23 +00:00
|
|
|
Before:
|
|
|
|
call ale#test#SetFilename('test.proto')
|
|
|
|
|
|
|
|
After:
|
|
|
|
Restore
|
|
|
|
|
2018-01-06 19:56:28 +00:00
|
|
|
unlet! b:ale_proto_protoc_gen_lint_options
|
|
|
|
|
2017-11-10 09:37:23 +00: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 19:56:28 +00: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(''))
|