-
Notifications
You must be signed in to change notification settings - Fork 1.7k
C#: Improve cs/invalid-string-formatting
and add to the Code Quality suite.
#19148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
michaelnebel
merged 18 commits into
github:main
from
michaelnebel:csharp/invalid-string-format
Apr 24, 2025
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
68f9349
C#: Add cs/invalid-string-formatting to the codeql quality suite.
michaelnebel 9cfd6e3
C#: Convert testing of cs/invalid-string-formatting to inline expecta…
michaelnebel 327ddb0
C#: Re-factor FormatMethod.
michaelnebel 175e4ec
C#: Add more format testcases.
michaelnebel f73b742
C#: Remove false positive example.
michaelnebel 1d9d878
C#: Remove some false positives and add more true positives for cs/in…
michaelnebel 8fb5fe9
C#: Update test expected output.
michaelnebel 11dffc6
C#: Add more invalid-string-formatting testcases.
michaelnebel f31235d
C#: Improve format logic to take CompositeFormat and generics into ac…
michaelnebel 39abd5c
C#: Update test expected output.
michaelnebel 930bb6b
C#: Add FP for string.Format using params collection.
michaelnebel 042c7e5
C#: Generalize array logic to params collection like types.
michaelnebel 6de5920
C#: Update test expected output.
michaelnebel f2dddd6
C#: Hide the abstract FormatMethod class.
michaelnebel 22ae3e7
C#: Update string format item parameter expected test case.
michaelnebel b6d2f14
C#: Add change note.
michaelnebel dcf11c2
C#: Match up sources, alerts and sinks in the tests.
michaelnebel 65ac951
C#: Remove all Sink tags after rebase.
michaelnebel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
C#: Re-factor FormatMethod.
- Loading branch information
commit 327ddb07a173f827c0316933a97472bac6ccdac5
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we are exposing an abstract method, which is not backwards-compatible (and also not best practice). So Instead replace the current abstract
FormatMethod
class with a privateFormatMethodImpl
class, and addfinal class FormatMethod = FormatMethodImpl;
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind, I see that you did exactly this in a subsequent commit.