Merge pull request #504 from bassjacob/master
Create reasonml merlin linter
This commit is contained in:
commit
fbed7c15b9
@ -95,6 +95,7 @@ name. That seems to be the fairest way to arrange this table.
|
||||
| Pug | [pug-lint](https://github.com/pugjs/pug-lint) |
|
||||
| Puppet | [puppet](https://puppet.com), [puppet-lint](https://puppet-lint.com) |
|
||||
| Python | [flake8](http://flake8.pycqa.org/en/latest/), [mypy](http://mypy-lang.org/), [pylint](https://www.pylint.org/) |
|
||||
| ReasonML | [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-integration-reason-merlin` for configuration instructions
|
||||
| reStructuredText | [proselint](http://proselint.com/)|
|
||||
| RPM spec | [rpmlint](https://github.com/rpm-software-management/rpmlint) (disabled by default; see `:help ale-integration-spec`) |
|
||||
| Ruby | [reek](https://github.com/troessner/reek), [rubocop](https://github.com/bbatsov/rubocop), [ruby](https://www.ruby-lang.org) |
|
||||
|
17
ale_linters/reason/merlin.vim
Normal file
17
ale_linters/reason/merlin.vim
Normal file
@ -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',
|
||||
\})
|
15
doc/ale-reasonml.txt
Normal file
15
doc/ale-reasonml.txt
Normal file
@ -0,0 +1,15 @@
|
||||
===============================================================================
|
||||
ALE ReasonML Integration *ale-reasonml-options*
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
merlin *ale-reasonml-merlin*
|
||||
|
||||
To use merlin linter for ReasonML source code you need to make sure Merlin for
|
||||
Vim is correctly configured. See the corresponding Merlin wiki page for
|
||||
detailed instructions
|
||||
(https://github.com/the-lambda-church/merlin/wiki/vim-from-scratch).
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
Loading…
Reference in New Issue
Block a user