ale/test/linter/test_buf_lint.vader
Guangqing Chen 477ad3fdd2
Allow to pass options to the buf linter and fix callback. (#4300)
* Allow to pass options to the buf linter

* Fix the callback of buf linter
2022-09-08 17:04:17 +09:00

33 lines
922 B
Plaintext

Before:
call ale#assert#SetUpLinterTest('proto', 'buf_lint')
call ale#test#SetFilename('test.proto')
After:
call ale#assert#TearDownLinterTest()
Execute(The default command should be correct):
AssertLinter 'buf',
\ ale#Escape('buf')
\ . ' lint'
\ . ' %s#include_package_files=true'
Execute(The callback should include any additional config):
let b:ale_proto_buf_lint_executable = '/tmp/buf'
let b:ale_proto_buf_lint_config = '/tmp/buf.yaml'
AssertLinter '/tmp/buf',
\ ale#Escape('/tmp/buf')
\ . ' lint'
\ . ' --config=' . ale#Escape('/tmp/buf.yaml')
\ . ' %s#include_package_files=true'
Execute(The callback should include additional options):
let b:ale_proto_buf_lint_executable = '/tmp/buf'
let b:ale_proto_buf_lint_options = '--disable-symlinks'
AssertLinter '/tmp/buf',
\ ale#Escape('/tmp/buf')
\ . ' lint'
\ . ' --disable-symlinks'
\ . ' %s#include_package_files=true'