Repository navigation
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve the anonymous question-mark suffix in annotation arguments so overlay[caller?] and overlay[local?] use their dedicated AST classes. Add regression coverage for optional and non-optional overlay annotations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The grammar update and AST handling are consistent and covered by focused regression tests.
Review effort: Balanced
Findings: None
What changed in this PR
Updates QL-for-QL to recognize optional overlay annotation arguments.
Changes:
- Updates the tree-sitter QL grammar revision.
- Preserves trailing
?in annotation argument values. - Adds regression coverage for optional overlay annotations.
| File | Description |
|---|---|
ql/ql/src/codeql_ql/ast/Ast.qll |
Handles optional annotation arguments. |
ql/extractor/Cargo.toml |
Updates the grammar dependency. |
ql/Cargo.lock |
Locks the updated dependency revision. |
ql/ql/test/queries/overlay/InlineOverlayCaller/OverlayAnnotations.ql |
Tests overlay annotation classes. |
ql/ql/test/queries/overlay/InlineOverlayCaller/OverlayAnnotations.expected |
Records expected annotation results. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
I believe this will fix failed runs like this, because the related PR introduces one of these annotations. I also think it should get rid of the parse errors in the "Make database and analyze" step of "Run QL for QL" runs like this, which has many lines like this: (There are some other warnings in json files, which are presumably unrelated.) |
This branch has not been deployed
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.
tree-sitter/tree-sitter-ql#26 updated the tree sitter grammar to allow it to parse these annotations with
?in them. This PR updates the dependency on the tree sitter grammar and updates the QL classes so they work correctly.