ale/test/linter/test_bzl_buildifier.vader
w0rp ae1d051504
#4454 Clean up more tests and code
* Remove some tests we no longer need
* Delete blocks of redundant code
* Compress some tests together to simplify them
* Remove a little code for ancient linter versions
* Escape more executables we didn't escape before
* Rename a deno option that didn't match our conventions
2023-09-16 22:23:30 +01:00

30 lines
983 B
Plaintext

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()