blob: 1fe9c8306965cca91c19790bce2f612fcd9b0324 (
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
|
Before:
call ale#assert#SetUpLinterTest('bzl', 'buildifier')
After:
call ale#assert#TearDownLinterTest()
Execute(Should use default command when bazel_buildifier_options are not set):
call ale#test#SetDirectory('/testplugin/test/test-files/bzl/bazel-package')
call ale#test#SetFilename('BUILD.bazel')
let g:ale_bazel_buildifier_executable = 'buildifier'
let g:ale_bazel_buildifier_options = ''
AssertLinter 'buildifier',
\ ale#Escape('buildifier') . ' -mode check -lint warn -path %s'
call ale#test#RestoreDirectory()
Execute(Should use custom buildifier options when bazel_buildifier_options are set):
call ale#test#SetDirectory('/testplugin/test/test-files/bzl/bazel-package')
call ale#test#SetFilename('BUILD.bazel')
let g:ale_bazel_buildifier_executable = 'buildifier'
let g:ale_bazel_buildifier_options = '-v'
AssertLinter 'buildifier',
\ ale#Escape('buildifier') . ' -mode check -lint warn -path %s -v'
call ale#test#RestoreDirectory()
|