Rust: Fix some Ql4Ql violations.#20333
Merged
michaelnebel merged 3 commits intogithub:mainfrom Sep 2, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes various Ql4Ql violations in the Rust codeql library based on specific checks for code quality improvements. The changes focus on removing unused variables, improving documentation, and simplifying code patterns.
Key changes:
- Removes unused private field variables in favor of inline expressions
- Adds missing parameter documentation for extensible predicates
- Improves code clarity by eliminating unnecessary variable declarations
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| rust/ql/lib/codeql/rust/internal/Type.qll | Removes unused private field and simplifies constructor logic |
| rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll | Removes unused qualifier field in CallExprMethodCall class |
| rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll | Adds missing documentation for madId parameter in extensible predicates |
| rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll | Adds missing documentation for preservesValue parameter |
paldepind
reviewed
Sep 2, 2025
Contributor
paldepind
left a comment
There was a problem hiding this comment.
Looks good. One small nitpick.
Co-authored-by: Simon Friis Vindum <paldepind@github.com>
paldepind
approved these changes
Sep 2, 2025
Contributor
paldepind
left a comment
There was a problem hiding this comment.
Looks great! Thanks for fixing these.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix some Ql4Ql violations based on the following checks
ql/field-only-used-in-charpredql/could-be-castql/counting-to-zeroql/dataflow-module-naming-conventionql/if-with-noneql/missing-parameter-qldocql/misspellingDCA looks good.