Skip to content

RuboCop linter shows offenses via CLI but not in ERB Linter #19

@jameshibbard

Description

@jameshibbard

Hi, Thanks for the extension!

I’m seeing a mismatch specifically with the RuboCop linter inside the ERB Linter extension.

Environment

  • Editor: Cursor 1.5.5 (VS Code-based, engine 1.99.3)
  • Ruby 3.4.4 / Rails 8.0.2.1
  • vscode-erb-linter v0.0.10, installed from VS Code marketplace
  • erb_lint in Gemfile, run via Bundler

What happens
When using the vscode-erb-linter extension in Cursor, diagnostics from ERB Lint’s built-in linters (including optional ones) appear both inline and in the Problems panel. This is good and expected.

However, findings from the RuboCop linter never show up in the editor, neither inline nor in the Problems panel.

The erb_lint gem itself works fine. Running e.g. bundle exec erb_lint app/views on the command line reports RuboCop offenses (for example Style/StringLiterals) as expected. For whatever reason it seems that the extension is not surfacing RuboCop linter results inside the editor.

Minimal config

# .erb-lint.yml
---
linters:
  Rubocop:
    enabled: true
    rubocop_config:
      inherit_from:
        - .rubocop.yml

Steps to reproduce

  1. Add rubocop to the project Gemfile and configure ERB Lint to use it in .erb-lint.yml.
  2. Introduce a RuboCop offense inside an ERB tag. For example, use single quotes where double quotes are expected: <%= stylesheet_link_tag 'app', "data-turbo-track": 'reload' %>
  3. Run bundle exec erb_lint app/views → the offense is reported correctly.
  4. Open the same file in Cursor with the ERB Linter extension enabled. No RuboCop diagnostics appear (while other ERBLint linters do).

Am I missing something obvious?

Happy to provide logs, screenshots or further details if helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions