-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: component-name-unique rule should report location #1759
fix: component-name-unique rule should report location #1759
Conversation
🦋 Changeset detectedLatest commit: a774fda The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Thank you for the contribution @pboos! I'll take a look into this once I have time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This a nice improvement to have the accurate location of one of the duplicates. I added a couple of comments about keeping the output formatting, and removing some commented code, could you take a look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pboos , this is definitely an improvement :)
Also tagging @tatomyr - do we need to update some test snapshots to go with this change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Left one small style comment.
Co-authored-by: Andrew Tatomyr <[email protected]>
6ede57d
to
a774fda
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'm going to merge this PR soon.
Thank you very much @pboos for making Redocly CLI better!
What/Why/How?
What: This sets the location on the reported problem & makes the message one line instead of multiple lines.
Why: The
component-name-unique
didn't report any location. That location is specifically useful when using the ignore file. The message is more aligned with the other reports.How: By using passing the
location
and reporting it instead of just passing theabsolutePointer
.Reference
Testing
See updated test code.
Screenshots (optional)
Check yourself
Security