Skip to content
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

Command to fetch descriptions of errors, warnings, and suggestions #993

Open
just-ero opened this issue Aug 1, 2023 · 1 comment
Open
Labels
proposal This item proposes new functionality.

Comments

@just-ero
Copy link

just-ero commented Aug 1, 2023

Description

It would be great if we had a command to fetch the descriptions of given error or warning messages such that when a user only provides the code, a description can still easily be retrieved.

Problems

As far as I can tell, there is absolutely no rhyme or reason to the API for these codes. It is possible to fetch their description from the Roslyn source code however (https://github.com/thomaslevesque/GenerateCSharpErrors/blob/master/CSharpErrorsAndWarnings.md), so perhaps a file could be kept, which frequently syncs with the Roslyn source code to generate human-readable messages to retrieve.


Here are some resources on Microsoft Learn pages which feature most of the relevant codes:

@patrickklaeren patrickklaeren added the proposal This item proposes new functionality. label Mar 26, 2024
@patrickklaeren patrickklaeren changed the title [Feature Suggestion]: Command to fetch descriptions of errors, warnings, and suggestions Command to fetch descriptions of errors, warnings, and suggestions Mar 26, 2024
@patrickklaeren
Copy link
Collaborator

We have discussed this. This seems like a worthwhile feature to implement and maintain going forward.

Thank you for the linked repository.

The proposed implementation:

  • Fork thomaslevesque/GenerateCSharpErrors
  • Generate a error code definition file with said fork, which may take the form of a dictionary
  • Include generated file as part of this MODiX repository
  • Add a command lookup {CODE} and look up relevant codes in full or partially
  • Return the relevant error messages, level, description in an embed to the invoker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This item proposes new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants