Skip to content

Editor integration #225

Open
Open
@manuelpuyol

Description

@manuelpuyol

Summary

erb-lint is a great tool to keep your ERB consistent and avoid known security issues, such as rendering raw inputs.

However, the linting process is usually late in the development process, typically being run during CI, which can slow down developers since they may only get notified of errors after opening a PR and getting the build to fail.

Proposal

Make erb-lint easy to integrate with editors (Vim, Emacs, VSCode...) so developers can have real-time feedback of the ERB they are editing.

Problems

The current output that erb-lint provides does not contain all the necessary information to decorate editors with the exact location of linting errors. Right now, it's only possible to get the line where the error occurs instead of the whole block (line + columns).

Solution

Adding a generic formatter that exposes more data about the error, such as a JSON formatter, similar to rubocop's formatter.

Exposing structured information about the errors in the file would allow better decorations for editors, like underlining the exact location of offenses.

Related

#173
#219
#224

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions