summaryrefslogtreecommitdiff
path: root/ale_linters/ocaml
diff options
context:
space:
mode:
authorAndrey Popp <8mayday@gmail.com>2016-11-23 18:19:36 +0300
committerw0rp <w0rp@users.noreply.github.com>2016-11-23 15:19:36 +0000
commitf7e6236fe8c1e9a31750c6d13931e591b44b5e3d (patch)
treea9de0434a21a1a0c406b548188a236888297c8f8 /ale_linters/ocaml
parentd700da8cb803237d313a7cfa1824b610b3435a0a (diff)
downloadale-f7e6236fe8c1e9a31750c6d13931e591b44b5e3d.zip
Add ocaml linter: merlin (#177)
* Add ocaml linter: merlin * Add docs for ocaml-merlin integration. * Remove annoying error message from ocaml merlin linter * Update doc to list merlin linter
Diffstat (limited to 'ale_linters/ocaml')
-rw-r--r--ale_linters/ocaml/merlin.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/ale_linters/ocaml/merlin.vim b/ale_linters/ocaml/merlin.vim
new file mode 100644
index 00000000..f8e0329e
--- /dev/null
+++ b/ale_linters/ocaml/merlin.vim
@@ -0,0 +1,19 @@
+" Author: Andrey Popp -- @andreypopp
+" Description: Report errors in OCaml code with Merlin
+
+if !exists('g:merlin')
+ finish
+endif
+
+function! ale_linters#ocaml#merlin#Handle(buffer, lines)
+ let l:errors = merlin#ErrorLocList()
+ return l:errors
+endfunction
+
+call ale#linter#Define('ocaml', {
+\ 'name': 'merlin',
+\ 'executable': 'ocamlmerlin',
+\ 'command': 'true',
+\ 'callback': 'ale_linters#ocaml#merlin#Handle',
+\})
+