summaryrefslogtreecommitdiff
path: root/test/linter/test_buf_lint.vader
blob: 2f065adc318d14e86909b328a6ac46605f2c1440 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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'