Repository navigation
Build Warnings Log SARIF and JSON reports - #1342
Merged
Merged
Conversation
:reports selects any of :text, :sarif, and :json, defaulting to :text, and :filename names each report's base, which takes the report's extension. Warnings are collected as records of their parsed location, severity, message, flag, and context lines. The structured reports cover every build context that ran a build step, even one without warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lugin cards Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Older GCC ends some warnings with [enabled by default], which is part of the message rather than a rule for SARIF to name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Build Warnings Log plugin can now write its warnings as SARIF 2.1.0 and JSON reports, alongside or instead of its plain text log.
:reportsselects any of:text,:sarif, and:json, as symbols or strings in any letter case. With no setting or an empty list, the plugin writes the text log alone. An unknown entry stops the build with an error naming it.:filenameis now a base name (defaultwarnings), and each report adds its own extension (.log,.sarif,.json). A project that set an extension other than.logsees its text log's extension change. This is recorded under%SRCROOT%, with any leading./dropped), and an absolute path is afile:URI;properties;automationDetails.idnames the build context.The text log is unchanged byte for byte. Deduplication,
:patterns, and:excludeswork as before.Implementation
WarningCollector#warningsreturns records of each warning's text and its parsed diagnostic fields. Output not in GCC's format has only its text and message.WarningReportsholds one small renderer per format.Docs
upload-sarif@v4step.Testing
:reportsvalidation.madsciencelab-pluginsimage.rake specs:unitsandrake specs:integrationpass, and lint is clean.🤖 Generated with Claude Code