Update CodeQL warning suppressions#4985
Merged
StephanTLavavej merged 1 commit intomicrosoft:mainfrom Sep 28, 2024
Merged
Conversation
Fixes: VSO-2255050 VSO-2255054 VSO-2255066 VSO-2255071 VSO-2255089 VSO-2255098 VSO-2255102 VSO-2255103 VSO-2255111 Original suppressions: GH 3489 GH 3585 GH 4942 Change `_System_error_message` control flow. This replaces an `_STL_INTERNAL_CHECK` with "unknown error".
CaseyCarter
approved these changes
Sep 27, 2024
Member
Author
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Merged
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.
Our internal infrastructure that periodically runs CodeQL and creates automated bug reports is changing how it accepts warning suppressions.
🏚️ Old suppression comments
The suppression comments that we've been using, of the form
// lgtm [cpp/too-many-puppies], are now rejected with:🪄 New suppression comments
The new form that we must use is:
// CodeQL [OpaqueID] Justification consisting of 25 or more charactersThis comment can appear on the affected line, or immediately above it.
Note that the opaque ID SM03936 for Alert Suppression Without Justification isn't what we ever want to use - we need to use the opaque ID for the underlying warning. I believe I've correctly looked these up, but we'll have to wait for the next round of automated bug reports to confirm.
🧹 Control flow cleanup
I'm changing how we handle
_System_error_message. The behavior is unchanged, except that it replaces an_STL_INTERNAL_CHECK(can't happen) with emitting"unknown error".🤫 Original suppression PRs
🐞 Internal bugs fixed