summaryrefslogtreecommitdiff
path: root/test/linter
diff options
context:
space:
mode:
author莊喬 <bootleq@gmail.com>2021-07-17 21:07:02 +0800
committerGitHub <noreply@github.com>2021-07-17 22:07:02 +0900
commitf83a1f70d542ac885b72d1161140d6d999e2d7b2 (patch)
tree14554776e3fbd17ec79871dfed944dd6f560280e /test/linter
parenta6a8131306f873c33c1983fbc74f0989bc6a4921 (diff)
downloadale-f83a1f70d542ac885b72d1161140d6d999e2d7b2.zip
Add option to clojure clj-kondo linter (#3812)
Allow define `clojure_clj_kondo_options` to customize command options for `clj-kondo`. The `--cache` in original command is now defined as default.
Diffstat (limited to 'test/linter')
-rw-r--r--test/linter/test_clj_kondo.vader15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/linter/test_clj_kondo.vader b/test/linter/test_clj_kondo.vader
new file mode 100644
index 00000000..869f9f2a
--- /dev/null
+++ b/test/linter/test_clj_kondo.vader
@@ -0,0 +1,15 @@
+Before:
+ call ale#assert#SetUpLinterTest('clojure', 'clj_kondo')
+
+After:
+ call ale#assert#TearDownLinterTest()
+
+Execute(The default command should be correct):
+ AssertLinter 'clj-kondo', 'clj-kondo'
+ \ . ' --cache --lint %t'
+
+Execute(Extra options should be supported):
+ let g:ale_clojure_clj_kondo_options = '--config ./clj-kondo/config.edn'
+
+ AssertLinter 'clj-kondo', 'clj-kondo'
+ \ . ' --config ./clj-kondo/config.edn --lint %t'