-
Notifications
You must be signed in to change notification settings - Fork 1.7k
QL4QL: Exclude PrintAst like tests from being reported as having missing InlineExpectations. #19104
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,4 +64,15 @@ class QlRefDocument extends YamlDocument { | |
value = n.lookup("postprocess").(YamlSequence).getElement(_) | ||
) | ||
} | ||
|
||
predicate isPrintAst() { | ||
this.getFile().getStem() = "PrintAst" | ||
or | ||
exists(YamlMapping n, YamlScalar value | | ||
n.getDocument() = this and | ||
value.getValue().matches("%PrintAst%") | ||
| | ||
value = n.lookup("query") | ||
) | ||
Comment on lines
+71
to
+76
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add a comment that this is for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the review! That is included in the char pred and description of the class There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, I didn't notice that context. LGTM 👍 |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
| | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dummy/PrintAst.ql |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
| | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
query: dummy/PrintAst.ql |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
| | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
select "" |
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.
A more ambitious solution would be to resolve the the query pointed to by the
.qlref
file, and then only flag cases where the query has kindproblem
orpath-problem
, but we can leave that for a future improvement.