summaryrefslogtreecommitdiff
path: root/test/command_callback
diff options
context:
space:
mode:
authorDmitri Vereshchagin <dmitri.vereshchagin@gmail.com>2019-09-01 17:36:40 +0300
committerDmitri Vereshchagin <dmitri.vereshchagin@gmail.com>2020-09-06 12:40:28 +0300
commit49718e0ec6eb4b9068049048c9373167c19257c9 (patch)
tree3df86c81d31ccedd77dddd68b1fcdb551bb55958 /test/command_callback
parent5bc49d204782617e01da65d83c0d9700a1b0a72f (diff)
downloadale-49718e0ec6eb4b9068049048c9373167c19257c9.zip
Add Elvis handler for Erlang
[Elvis][1] is an Erlang style reviewer. [1]: https://github.com/inaka/elvis
Diffstat (limited to 'test/command_callback')
-rw-r--r--test/command_callback/test_erlang_elvis_command_callback.vader16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/command_callback/test_erlang_elvis_command_callback.vader b/test/command_callback/test_erlang_elvis_command_callback.vader
new file mode 100644
index 00000000..4aab49d6
--- /dev/null
+++ b/test/command_callback/test_erlang_elvis_command_callback.vader
@@ -0,0 +1,16 @@
+Before:
+ let b:file = fnamemodify(bufname(''), ':.')
+ call ale#assert#SetUpLinterTest('erlang', 'elvis')
+
+After:
+ call ale#assert#TearDownLinterTest()
+
+Execute(Default command should be correct):
+ AssertLinter 'elvis',
+ \ ale#Escape('elvis') . ' rock --output-format=parsable ' . ale#Escape(b:file)
+
+Execute(Executable should be configurable):
+ let b:ale_erlang_elvis_executable = '/path/to/elvis'
+
+ AssertLinter '/path/to/elvis',
+ \ ale#Escape('/path/to/elvis') . ' rock --output-format=parsable ' . ale#Escape(b:file)