Skip to content

Conversation

mcserep
Copy link

@mcserep mcserep commented Jun 15, 2025

In Sarif 2.0 and 2.1 the error / warning messages are not directly in the message element, instead they are in the message.text element. See GitHub documentation or the Sarif format specification itself.

Currently the Converter2 uses result.Message as a string, which will simply be converted to Microsoft.CodeAnalysis.Sarif.Message (the type's name) always. Instead result.Message.Text should be used.

Note: in Sarif 2 the message text may contain placeholders for arguments. This PR does not resolve injecting those arguments in place of the placeholders, but that could be a further fix / improvement.

@mcserep
Copy link
Author

mcserep commented Jun 15, 2025

Also, thanks for making this converter, it is quite useful in CI pipelines 😃

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.

1 participant