redocly-cli icon indicating copy to clipboard operation
redocly-cli copied to clipboard

fix: component-name-unique rule should report location

Open pboos opened this issue 1 year ago • 2 comments

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 the absolutePointer.

Reference

Testing

See updated test code.

Screenshots (optional)

Check yourself

  • [ ] Code changed? - Tested with redoc/reference-docs/workflows (internal)
  • [x] All new/updated code is covered with tests
  • [ ] New package installed? - Tested in different environments (browser/node)

Security

  • [ ] Security impact of change has been considered
  • [ ] Code follows company security practices and guidelines

pboos avatar Oct 10 '24 09:10 pboos

🦋 Changeset detected

Latest commit: a774fda6e36efcc4c34edf151c9acd7d131fdcdb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@redocly/openapi-core Minor
@redocly/cli Minor

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

changeset-bot[bot] avatar Oct 10 '24 09:10 changeset-bot[bot]

Thank you for the contribution @pboos! I'll take a look into this once I have time.

tatomyr avatar Oct 21 '24 08:10 tatomyr

Also tagging @tatomyr - do we need to update some test snapshots to go with this change?

lornajane avatar Oct 25 '24 16:10 lornajane