Repository navigation
Add support for CMake SARIF files - #5106
Open
Dan (dpt-kw) wants to merge 1 commit into
Open
Dan (dpt-kw) wants to merge 1 commit into
Dan (dpt-kw) wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree company="Kitware, Inc." |
Dan (dpt-kw)
force-pushed
the
sarif
branch
2 times, most recently
from
October 28, 2026 14:56
4cea833 to
3067214
Compare
Dan (dpt-kw)
marked this pull request as ready for review
November 3, 2026 14:55
Introduce an option to enable CMake SARIF file generation using the CMAKE_EXPORT_SARIF cache variable and load language diagnostics from the file. Fixes: microsoft#5069
Author
|
I'm proposing adding a new dev-only dependency, |
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.
This change addresses item #5069.
This adds support for CMake's SARIF files by adding extension settings which control generation of the file and whether contents are loaded.
The following changes are proposed:
exportSarifFilewhich will enable the cache variableCMAKE_EXPORT_SARIFunless the selected kit or preset specifies a value. Support was first added to CMake in 4.0.loadSarifFile. If enabled, the extension checks the SARIF status by checking both the cache definitionCMAKE_EXPORT_SARIFand the CLI flag--sarif-output=.... If the file is modern, language diagnostics will be loaded from this file instead of the stream parser. Proper configure diagnostics support isn't available until CMake 4.5.AUTHOR_WARNING).The purpose of this change
Add extension options for controlling the new CMake SARIF feature in VS Code. Allow CMake-language diagnostics to be loaded from the SARIF file.