summaryrefslogtreecommitdiff
path: root/ale_linters/reason
diff options
context:
space:
mode:
authorJacob Bass <jacob@jacobbass.net>2017-04-26 19:25:25 +1000
committerJacob Bass <jacob@jacobbass.net>2017-04-26 19:29:09 +1000
commit4db5f3923d8e30155c02fd903817e27cc0aa293f (patch)
tree25c059eabeffb0858115bea2101012ff5c84511f /ale_linters/reason
parent65fc4aeb1e12d75b2174bdcd887aacf2c7c98952 (diff)
downloadale-4db5f3923d8e30155c02fd903817e27cc0aa293f.zip
Create reasonml merlin linter
copy @andreypopp 's ocaml merlin linter from this project into reason
Diffstat (limited to 'ale_linters/reason')
-rw-r--r--ale_linters/reason/merlin.vim17
1 files changed, 17 insertions, 0 deletions
diff --git a/ale_linters/reason/merlin.vim b/ale_linters/reason/merlin.vim
new file mode 100644
index 00000000..7bef7df8
--- /dev/null
+++ b/ale_linters/reason/merlin.vim
@@ -0,0 +1,17 @@
+" Author: Andrey Popp -- @andreypopp
+" Description: Report errors in ReasonML code with Merlin
+
+if !exists('g:merlin')
+ finish
+endif
+
+function! ale_linters#reason#merlin#Handle(buffer, lines) abort
+ return merlin#ErrorLocList()
+endfunction
+
+call ale#linter#Define('reason', {
+\ 'name': 'merlin',
+\ 'executable': 'ocamlmerlin',
+\ 'command': 'true',
+\ 'callback': 'ale_linters#reason#merlin#Handle',
+\})