-
Notifications
You must be signed in to change notification settings - Fork 1.9k
C#: Add most medium precision queries to the code-quality-extended suite.
#20292
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
C#: Add most medium precision queries to the code-quality-extended suite.
#20292
Conversation
8edb66f to
7773846
Compare
55c325d to
be55348
Compare
7773846 to
67a2966
Compare
67a2966 to
b02107d
Compare
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.
Pull Request Overview
This PR adds all medium precision quality queries to the C# code-quality-extended query suite by updating query metadata to include the "quality" tag while preserving existing tags.
- Updates 42 C# queries by adding the "quality" tag to their metadata
- Reorganizes existing tags to maintain proper formatting with "quality" as the primary tag
- Updates the expected query suite output to reflect the newly included queries
Reviewed Changes
Copilot reviewed 44 out of 44 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
Various .ql files (42 total) |
Added "quality" tag while preserving existing tags like "maintainability", "reliability", etc. |
not_included_in_qls.expected |
Removed queries that are now included in the quality suite |
csharp-code-quality-extended.qls.expected |
Added 42 new queries to the expected output |
b02107d to
6955e24
Compare
code-quality-extended.
code-quality-extended.medium precision queries to the code-quality-extended suite.
| * language-features | ||
| * @tags quality | ||
| * reliability | ||
| * correctness |
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.
I'm not convinced we should add this query; the semantics of capturing a foreach variable has been stable since C# 5, which was released in 2012.
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.
Makes sense! I was also considering it, since C# 5 is very old and it probably has limited value. Thank you for pointing it out!
Will open another PR for deprecating the query instead.
951be15 to
4420d09
Compare
|
@hvitved: Since your last review, the query |
… suite (and update tags).
289884d to
d903448
Compare
|
@hvitved: Added a change note since your last review. |
In this PR we add most
mediumprecision queries to thecodeql-quality-extendedsuite, with the exception ofcs/xmldoc/*queries as they produce an overwhelming number of results (they are also excluded for other languages).cs/captured-foreach-variableas this query is related to change in semantics between C# 4 and C# 5.DCA looks good
mediumprecision queries adds to 30% to the analysis time compared to only running queries with precisionvery-highandhigh).