This package will lint your ERB files in Atom by running them through erb -x
and sending the output to ruby -c
for checking.
Before using this package you will need to have Ruby installed and
available from your $PATH
.
The Linter and package will be installed for you to provide an interface to this package. If you are using an alternative debugging interface that supports linter plugins simply disable Linter.
If you do not already have it installed, language-ruby will also be installed for you.
To install this package either search for it from within Atom's settings menu or run the following command.
apm install linter-erb
All of linter-erb's settings are available from within Atom's settings menu. If you prefer to manually edit the configuration file the following settings are available:
erbExecutablePath
: Defaults to erb
, allowing the $PATH
to resolve the
correct location. If you need to override this specify the full path to
erb
.
rubyExecutablePath
: Defaults to ruby
, allowing the $PATH
to resolve
the correct location. If you need to override this specify the full path to
ruby
.
trimMode
: Select the trim mode used by ERB when generating the code
before sending off to Ruby for checking. Defaults to -
for out-of-the-box
compatibility with Rails. For a full description of what the options mean
see the documentation.
Note: Modes other than None
may cause the error line numbers to
not match the source line numbers.
If you are unsure of the location on your system of a program there are
utilities you can use to find the full path. For example to find the path to
erb
you would run one of the following:
On a UNIX / OS X system simply run which erb
in a terminal. You should
get something similar to /usr/bin/erb
.
On Windows run where.exe erb
in a prompt. You should get back something
similar to C:\Ruby22\bin\erb
.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.