summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-08-22 10:33:08 +0100
committerGitHub <noreply@github.com>2017-08-22 10:33:08 +0100
commit9d3bda4441a293eac47050428fee7fb4879547d7 (patch)
treee8c30933ad0cd844965a556025781b7c2cb9d82e
parenta3299bf03a405207347d8d06c28b65af1e0a5092 (diff)
parentb356d564483d68ffbd7cc11436d3484148cf39fb (diff)
downloadale-9d3bda4441a293eac47050428fee7fb4879547d7.zip
Merge pull request #865 from jez/erubis-linter
Add erubis linter
-rw-r--r--README.md2
-rw-r--r--ale_linters/eruby/erubis.vim11
-rw-r--r--doc/ale-eruby.txt17
-rw-r--r--doc/ale.txt1
4 files changed, 30 insertions, 1 deletions
diff --git a/README.md b/README.md
index 2f1596c4..22866120 100644
--- a/README.md
+++ b/README.md
@@ -79,7 +79,7 @@ name. That seems to be the fairest way to arrange this table.
| Dockerfile | [hadolint](https://github.com/lukasmartinelli/hadolint) |
| Elixir | [credo](https://github.com/rrrene/credo), [dogma](https://github.com/lpil/dogma) |
| 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) |
| Fortran | [gcc](https://gcc.gnu.org/) |
| FusionScript | [fusion-lint](https://github.com/RyanSquared/fusionscript) |
diff --git a/ale_linters/eruby/erubis.vim b/ale_linters/eruby/erubis.vim
new file mode 100644
index 00000000..be9332df
--- /dev/null
+++ b/ale_linters/eruby/erubis.vim
@@ -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',
+\})
+
diff --git a/doc/ale-eruby.txt b/doc/ale-eruby.txt
new file mode 100644
index 00000000..b9cd3cbf
--- /dev/null
+++ b/doc/ale-eruby.txt
@@ -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:
diff --git a/doc/ale.txt b/doc/ale.txt
index 6f514894..18ea367c 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -37,6 +37,7 @@ CONTENTS *ale-contents*
erlang................................|ale-erlang-options|
erlc................................|ale-erlang-erlc|
syntaxerl...........................|ale-erlang-syntaxerl|
+ eruby.................................|ale-eruby-options|
fortran...............................|ale-fortran-options|
gcc.................................|ale-fortran-gcc|
fusionscript..........................|ale-fuse-options|