[Bug Report] location column for violations through association inspector is wrongly displayed in packwerk-vscode
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.9k
- Forks
- 121
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the violation from a file containing an association inspector, then inspect the parser translator, especially the Prism integration mentioned in the report. Done means the reported location starts at the association name, such as :summaries or :todos, while preserving the violating span length.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100