Skip to content

"Semantic" markup in SARIF messages #662

@davidmalcolm

Description

@davidmalcolm

There doesn't seem to be a way to add "semantic" markup to messages in SARIF logs.

For example, in GCC 15 I've added colorization to some diagnostics to highlight expected type vs actual type; see:
https://godbolt.org/z/zqWGe5jKh

image

where note how

  • the %i in the message line and quoted source and the int in the message line and the source annotation all appear in green (they're marked up internally as expected_type)
  • the const char * in the message line and in the source annotation and the msg in the quoted source all appear in dark blue (they're marked up internally as actual_type)

I'd like to capture this markup in the generated SARIF output, but we only support a subset of Markdown, and, in particular, HTML is forbidden.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions