-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Python: Add most medium
precision queries to the code-quality-extended
suite.
#20402
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
Python: Add most medium
precision queries to the code-quality-extended
suite.
#20402
Conversation
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 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 reliability | ||
* @tags quality | ||
* reliability | ||
* correctness | ||
* readability |
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.
Is it allowed to have the readability
tag without maintainability
?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. This looks good then.
* readability | ||
* 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.
Similar question for correctness
without reliability
* @tags quality | ||
* reliability | ||
* correctness | ||
* readability |
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.
readability
without maintainability
here too.
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.
Besides those questions, looks good
In this PR we add most medium precision queries to the
codeql-quality-extended
suite, with the exception ofpy/missing-docstring
as it produces an overwhelmingly number of results.python/py/pythagorean
query as it doesn't seems especially relevant.DCA looks good.
medium
precision queries together with thevery-high
andhigh
precision queries increases by around 5%.