Skip to content

Fix spacing and sorting of allowed values in impldef_category_to_csr_category error message#229

Merged
james-ball-qualcomm merged 2 commits intoadd_warl_wlrlfrom
copilot/sub-pr-227-again
Mar 24, 2026
Merged

Fix spacing and sorting of allowed values in impldef_category_to_csr_category error message#229
james-ball-qualcomm merged 2 commits intoadd_warl_wlrlfrom
copilot/sub-pr-227-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 24, 2026

Error messages from impldef_category_to_csr_category joined allowed values with ",", producing unreadable output like WARL,WLRL.

Change

  • tools/shared_utils.py: Use ", ".join(sorted(...)) instead of ",".join(...) so error output reads WARL, WLRL — spaced and consistently ordered.
# Before
allowed_str = ",".join(IMPLDEF_CATEGORY_TO_CSR_CATEGORY)

# After
allowed_str = ", ".join(sorted(IMPLDEF_CATEGORY_TO_CSR_CATEGORY))

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

…_category error message

Co-authored-by: james-ball-qualcomm <140646808+james-ball-qualcomm@users.noreply.github.com>
Agent-Logs-Url: https://github.com/riscv/docs-resources/sessions/a2836ff9-8d04-4f89-afb6-07356b5b3405
Copilot AI changed the title [WIP] [WIP] Address feedback on "Add warl wlrl" PR Fix spacing and sorting of allowed values in impldef_category_to_csr_category error message Mar 24, 2026
@james-ball-qualcomm james-ball-qualcomm marked this pull request as ready for review March 24, 2026 14:34
Copilot AI review requested due to automatic review settings March 24, 2026 14:34
@james-ball-qualcomm james-ball-qualcomm merged commit d8f50ce into add_warl_wlrl Mar 24, 2026
2 checks passed
@james-ball-qualcomm james-ball-qualcomm deleted the copilot/sub-pr-227-again branch March 24, 2026 14:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves the readability and determinism of the error message emitted by impldef_category_to_csr_category in tools/shared_utils.py when an unknown impl-def-category is provided, by formatting the list of allowed values with consistent spacing and ordering.

Changes:

  • Format allowed impl-def-category values with ", ".join(...) instead of ",".join(...).
  • Sort allowed values before displaying them to keep error output stable across runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants