Skip to content

Conversation

michaelnebel
Copy link
Contributor

@michaelnebel michaelnebel commented Sep 10, 2025

In this PR we add most medium precision queries to the codeql-quality-extended suite, with the exception of

  • The py/missing-docstring as it produces an overwhelmingly number of results.
  • The python/py/pythagorean query as it doesn't seems especially relevant.

DCA looks good.

  • Execution time when running the medium precision queries together with the very-high and high precision queries increases by around 5%.

@michaelnebel michaelnebel added the no-change-note-required This PR does not need a change note label Sep 11, 2025
@michaelnebel michaelnebel marked this pull request as ready for review September 11, 2025 07:12
@michaelnebel michaelnebel requested a review from a team as a code owner September 11, 2025 07:12
@Copilot Copilot AI review requested due to automatic review settings September 11, 2025 07:12
Copy link
Contributor

@Copilot Copilot AI left a 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

@michaelnebel michaelnebel changed the title Python: Add many medium precision queries to the code-quality-extended suite. Python: Add most medium precision queries to the code-quality-extended suite. Sep 11, 2025
* @tags reliability
* @tags quality
* reliability
* correctness
* readability
Copy link
Contributor

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?

Copy link
Contributor Author

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."

Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor

@joefarebrother joefarebrother left a 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

@michaelnebel michaelnebel merged commit 34ebed1 into github:main Sep 17, 2025
20 checks passed
@michaelnebel michaelnebel deleted the python/code-quality-extended branch September 17, 2025 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants