Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

🐛 Diagnostics don't inherit file path when creating a Location type #3829

Closed
1 task done
ematipico opened this issue Nov 23, 2022 · 0 comments · Fixed by #3834
Closed
1 task done

🐛 Diagnostics don't inherit file path when creating a Location type #3829

ematipico opened this issue Nov 23, 2022 · 0 comments · Fixed by #3834
Assignees
Labels
A-Diagnostic Area: errors and diagnostics S-Bug: confirmed Status: report has been confirmed as a valid bug

Comments

@ematipico
Copy link
Contributor

ematipico commented Nov 23, 2022

Environment information

main

What happened?

At the moment there's a small issue where creating a Location via the builder pattern doesn't always pick up the file path injected via with_file_path.

This forces us, as a workaround, to do this: https://github.com/rome/tools/blob/main/crates/rome_analyze/src/diagnostics.rs#L114-L117

As a consequence, there's some code that is not called at the moment: https://github.com/rome/tools/blob/main/crates/rome_analyze/src/rule.rs#L394-L415

Expected result

We should be able to create a correct Location by mixing the location information coming from a client and the information inside a diagnostic type.

Code of Conduct

  • I agree to follow Rome's Code of Conduct
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Diagnostic Area: errors and diagnostics S-Bug: confirmed Status: report has been confirmed as a valid bug
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants