Commit Graph

16 Commits

Author SHA1 Message Date
Roeland 1ee7580557
Add support for erblint (#3931)
* support for erblint

* fix tests

* test for handler

* wrong names

* typo

* doc layout

* CI failed?
2021-10-09 14:33:07 +09:00
w0rp 7d4ce4e6aa
Close #3325 - Apply new formatting where possible 2020-08-28 19:50:36 +01:00
Eddie Lebow 58e8d32d79
Move ale#handlers#ruby#EscapeExecutable to ale#ruby#EscapeExecutable
This function is generally applicable to Ruby, not just handling linter
output.
2019-08-13 01:52:13 -04:00
w0rp 3bebcb5d48
#2132 - Replace command_chain and chain_with with ale#command#Run 2019-04-07 14:58:06 +01:00
w0rp 883978ece9
#2132 - Replace all uses of foo_callback with foo 2019-02-22 18:05:04 +00:00
Andrew Clemons fa036ca72c Add initial support for ruumba in eruby files.
Ruumba provides RuboCop linting for ERB templates.

https://github.com/ericqweinstein/ruumba
2018-11-04 19:55:06 +13:00
w0rp 9849c79ff7
Merge pull request #1157 from elebow/eruby-add-erubi-linter
[eruby] Add erubi linter
2018-01-24 10:40:57 +00:00
Eddie Lebow aa29c91cdc [eruby] Add erubi linter
Erubi is yet another parser for eRuby. This is the default parser in
Rails as of version 5.1. It supports some additional syntax with similar
behavior to Rails' extensions to the language, though incompatible.
Rails currently still recommends their own syntax, so GetCommand still
has to do the translation introduced in
https://github.com/w0rp/ale/pull/1114 .

Erubi does not supply an executable—It is intended to be invoked only
from within a Ruby program. In this case, a one-liner on the command
line.
2018-01-16 00:38:35 -05:00
Jelte Fennema e7eb272714
Fix erb linter for puppet style erb scripts 2017-12-13 14:59:59 +01:00
w0rp e6fb32b792 Remove a Unicode character Vint complains about 2017-11-21 16:39:05 +00:00
Eddie Lebow b390c69642 erb, erubis: Redirect file into first command.
The previous version relied on a zsh-specific behavior where
`<filename` after a pipe could redirect to the first command. This
is the standard way to do it.
2017-11-16 23:10:25 -05:00
Eddie Lebow ad7ea36307 [eruby] Add GetCommand to erubis linter
GetCommand conditionally adds a filter (implemented as inline Ruby code
in the command line) to transform some of the problematic
Rails-specific eRuby syntax. Specifically, <%= tags are replaced with
<%.

This does not reduce the effectiveness of the linter, because the
transformed code is still evaluated.

This solution was suggested by @rgo at
https://github.com/w0rp/ale/issues/580#issuecomment-337676607.
2017-11-12 23:33:34 -05:00
Eddie Lebow ea7f68226e [eruby] Add GetCommand to erb linter
GetCommand conditionally adds a filter (implemented as inline Ruby code
in the command line) to transform some of the problematic
Rails-specific eRuby syntax. Specifically, <%= tags are replaced with
<%.

This does not reduce the effectiveness of the linter, because the
transformed code is still evaluated.

This solution was suggested by @rgo at
https://github.com/w0rp/ale/issues/580#issuecomment-337676607.
2017-11-12 23:33:30 -05:00
Eddie Lebow e9e29e003c [eruby] Rename `erubylint` → `erb` to match tool name 2017-11-12 23:33:22 -05:00
Jake Zimmerman b356d56448 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.
2017-08-21 13:51:42 -07:00
Matthias Günther c55064881d Add erb linter (#497)
* Add eruby linter

* Update README with erb linter

* Fix example and contributions

* Remove trailing newline

* Fix for Vimscript style guide

* Eruby-linter: codereview with @w0rp
- read from stderro output_stream

* Eruby-linter: codereview => add handler for ruby

* Eruby-linter: codereview
- eruby and ruby lint use the same ruby-handler (removes
  duplicated handling logic)

* Eruby-linter: try to fix tests
2017-04-25 18:38:02 +01:00