Skip to content

[Bug Report] location column for violations through association inspector is wrongly displayed in packwerk-vscode #396

@exterm

Description

@exterm

Description
image

The violation should start at the name of the association, not the method call. In this example, :summaries and :todos should be underlined (using packwerk-vscode, but I've validated that this problem occurs in packwerk's output). You can see that the length of the violating piece of code corresponds to the name, but the location is wrong.

I assume this was introduced with the recent parser change, in which case it could point to a bug in Prism's parser translator.

To Reproduce
Analyze a file with a violating association.

Expected Behaviour
The violation is attributed to the name of the association, which is an implicit constant reference

Version Information

  • Packwerk: 3.2.0
  • Ruby 3.2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions