summaryrefslogtreecommitdiff
path: root/test/linter
diff options
context:
space:
mode:
authorAlex McKinney <alexmckinney01@gmail.com>2022-04-06 01:00:59 -0700
committerGitHub <noreply@github.com>2022-04-06 17:00:59 +0900
commit607f33a1b0f662d9809d54363e8e81a4965862ce (patch)
tree4795d8a2dd649f930202b93e25dadf4bd6f8402a /test/linter
parent1e997580fdbb8e11e043af071c97d3aa879cf875 (diff)
downloadale-607f33a1b0f662d9809d54363e8e81a4965862ce.zip
Add buf linter and fixer (#4128)
* Add buf lint to linters * Add buf format to fixers * Fix test/linter/test_buf_lint.vader * Fix test/fixers/test_buf_format_fixer_callback.vader * Simplify test/test-files/proto/testfile.proto * Add buf-lint alias and rename linter
Diffstat (limited to 'test/linter')
-rw-r--r--test/linter/test_buf_lint.vader22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/linter/test_buf_lint.vader b/test/linter/test_buf_lint.vader
new file mode 100644
index 00000000..7b8bb52c
--- /dev/null
+++ b/test/linter/test_buf_lint.vader
@@ -0,0 +1,22 @@
+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 options):
+ 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'