Add erubis linter

This linter works largely the same as the existing `erubylint` linter,
except it works with `erubis` instead of `erb` as the driving command.
This commit is contained in:
Jake Zimmerman 2017-08-21 13:34:42 -07:00
parent 5010ddc28f
commit b356d56448
4 changed files with 30 additions and 1 deletions

View File

@ -75,7 +75,7 @@ name. That seems to be the fairest way to arrange this table.
| Dockerfile | [hadolint](https://github.com/lukasmartinelli/hadolint) | | Dockerfile | [hadolint](https://github.com/lukasmartinelli/hadolint) |
| Elixir | [credo](https://github.com/rrrene/credo), [dogma](https://github.com/lpil/dogma) | | Elixir | [credo](https://github.com/rrrene/credo), [dogma](https://github.com/lpil/dogma) |
| Elm | [elm-make](https://github.com/elm-lang/elm-make) | | Elm | [elm-make](https://github.com/elm-lang/elm-make) |
| Erb | [erb](https://github.com/jeremyevans/erubi) | | Erb | [erb](https://github.com/jeremyevans/erubi), [erubis](https://github.com/kwatch/erubis) |
| Erlang | [erlc](http://erlang.org/doc/man/erlc.html), [SyntaxErl](https://github.com/ten0s/syntaxerl) | | Erlang | [erlc](http://erlang.org/doc/man/erlc.html), [SyntaxErl](https://github.com/ten0s/syntaxerl) |
| Fortran | [gcc](https://gcc.gnu.org/) | | Fortran | [gcc](https://gcc.gnu.org/) |
| FusionScript | [fusion-lint](https://github.com/RyanSquared/fusionscript) | | FusionScript | [fusion-lint](https://github.com/RyanSquared/fusionscript) |

View File

@ -0,0 +1,11 @@
" Author: Jake Zimmerman <jake@zimmerman.io>
" Description: eruby checker using `erubis`, instead of `erb`
call ale#linter#Define('eruby', {
\ 'name': 'erubis',
\ 'executable': 'erubis',
\ 'output_stream': 'stderr',
\ 'command': 'erubis -x %t | ruby -c',
\ 'callback': 'ale#handlers#ruby#HandleSyntaxErrors',
\})

17
doc/ale-eruby.txt Normal file
View File

@ -0,0 +1,17 @@
===============================================================================
ALE Eruby Integration *ale-eruby-options*
There are two linters for `eruby` files:
- `erubylint`
- `erubis`
If you don't know which one your project uses, it's probably `erb`.
To selectively enable one or the other, see |g:ale_linters|.
(Note that ALE already disables linters if the executable for that linter is
not found; thus, there's probably no need to disable one of these if you're
using the other one.)
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@ -36,6 +36,7 @@ CONTENTS *ale-contents*
erlang................................|ale-erlang-options| erlang................................|ale-erlang-options|
erlc................................|ale-erlang-erlc| erlc................................|ale-erlang-erlc|
syntaxerl...........................|ale-erlang-syntaxerl| syntaxerl...........................|ale-erlang-syntaxerl|
eruby.................................|ale-eruby-options|
fortran...............................|ale-fortran-options| fortran...............................|ale-fortran-options|
gcc.................................|ale-fortran-gcc| gcc.................................|ale-fortran-gcc|
fusionscript..........................|ale-fuse-options| fusionscript..........................|ale-fuse-options|