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

Add more information to analysis.Diagnostic #3086

Closed
jribbink opened this issue Feb 8, 2024 · 0 comments · Fixed by #3082
Closed

Add more information to analysis.Diagnostic #3086

jribbink opened this issue Feb 8, 2024 · 0 comments · Fixed by #3082
Assignees

Comments

@jribbink
Copy link
Contributor

jribbink commented Feb 8, 2024

Issue to be solved

Currently analysis.Diagnostic only contains information regarding:

  • Messaging
  • Fixes
  • Location
  • A black box "category" field

In order to provide more robust diagnostic information to users, it would be helpful to extend this struct and add the following

  • URL to documentation
  • An error code (needed by LSP to link to documentation & useful to categorize/identify diagnostics when looking for solutions, documentation, help, etc)
  • Severity field

While certain tooling (LS) does use the "Category" field to resolve a severity, it is somewhat limiting and there are benefits to a more generalized approach:

  • Analyzers cannot define severity on a per-diagnostic basis
  • Diagnostic categories are not necessarily standardized and it may not be entirely clear to the consumer which category maps to which severity level/which diagnostic categories exist

Suggested Solution

No response

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

Successfully merging a pull request may close this issue.

1 participant