Python: Add most medium precision queries to the code-quality-extended suite.#20402
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds most medium precision queries to the python-code-quality-extended suite to increase test coverage and improve code quality detection, while maintaining reasonable execution time overhead.
Key changes:
- Updates tags for consistency across medium precision queries to include standardized quality indicators
- Integrates 12 medium precision queries into the extended quality suite
- Excludes specific queries that would produce excessive results or have limited relevance
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Variables/*.ql | Updated tags for variable-related queries to include "quality" and standardized correctness/reliability tags |
| Statements/*.ql | Updated tags for statement-related queries to include "quality" and standardized error-handling tags |
| Functions/ReturnValueIgnored.ql | Removed statistical tags and added "quality" tag for consistency |
| Expressions/NonPortableComparisonUsingIs.ql | Updated tags to focus on quality and reliability rather than portability |
| Classes/*.ql | Updated tags for class-related queries to include "quality" and performance/complexity indicators |
| Imports/FromImportOfMutableAttribute.ql | Updated tags to focus on quality and reliability rather than modularity |
| python-code-quality-extended.qls.expected | Added 12 new medium precision queries to the extended suite |
| not_included_in_qls.expected | Removed queries that are now included in the extended suite |
medium precision queries to the code-quality-extended suite.medium precision queries to the code-quality-extended suite.
| * @tags quality | ||
| * reliability | ||
| * correctness | ||
| * readability |
There was a problem hiding this comment.
Is it allowed to have the readability tag without maintainability?
There was a problem hiding this comment.
Yes, we are allowed to use sub-categories from both top level categories. The documentation was changed to include "You may use sub-categories from both top-level categories on the same query. However, if you only use sub-categories from a single top-level category, then you must also tag the query with that top-level category."
There was a problem hiding this comment.
Got it. This looks good then.
| * @tags quality | ||
| * maintainability | ||
| * readability | ||
| * correctness |
There was a problem hiding this comment.
Similar question for correctness without reliability
| * @tags quality | ||
| * reliability | ||
| * correctness | ||
| * readability |
There was a problem hiding this comment.
readability without maintainability here too.
joefarebrother
left a comment
There was a problem hiding this comment.
Besides those questions, looks good
In this PR we add most medium precision queries to the
codeql-quality-extendedsuite, with the exception ofpy/missing-docstringas it produces an overwhelmingly number of results.python/py/pythagoreanquery as it doesn't seems especially relevant.DCA looks good.
mediumprecision queries together with thevery-highandhighprecision queries increases by around 5%.