Uh oh!
There was an error while loading. Please reload this page.
Convert remaining {go,swift,ruby}-code-scanning.qls query tests to .qlref - #19817
Conversation
{go,swift,ruby,java}-code-scanning.qls query tests to .qlref{go,swift,ruby,java}-code-scanning.qls query tests to .qlref{go,swift,ruby}-code-scanning.qls query tests to .qlref4a12777 to
2aaa656CompareUh oh!
There was an error while loading. Please reload this page.
2aaa656 to
c628653CompareUh oh!
There was an error while loading. Please reload this page.
c628653 to
657e782Compare| TestRemoteSource() { this.asExpr().(ApplyExpr).getStaticTarget().getName().matches("source%") } | ||
| override string getSourceType() { result = "Test source" } | ||
| } |
There was a problem hiding this comment.
This test source isn't supported in the new approach but ... doesn't appear to make any difference. All the test cases use String(contentsOf: ...) as their sources anyway.
hvitved
left a comment
There was a problem hiding this comment.
Thanks a lot for doing this.
| def foo | ||
| def download_tools(installer) | ||
| Excon.get(installer[:url]) # $ MISSING: BAD= (requires hash flow) | ||
| Excon.get(installer[:url]) # $ MISSING: $Alert (requires hash flow) |
There was a problem hiding this comment.
The $ in front of Alert should be removed.
| cmd = params[:cmd] | ||
| `#{cmd}` | ||
| system(cmd) | ||
| cmd = params[:cmd] # $Source |
There was a problem hiding this comment.
Nit: We typically have a space after the $ marker.
There was a problem hiding this comment.
Oh yeah, I missed that when reviewing Go.
657e782 to
35a48e7Compared10c
commented
Jun 24, 2025
Rebased with the suggestions applied (including adding a space in |
Converts the remaining
{go,swift,ruby}-code-scanning.qlsquery tests to.qlref.Example prior work: #18848
In the Go IncorrectIntegerConversion case, the
#select,edges, andnodesquery predicates have different results depending on whether the Go source is compiled under 64-bit or 32-bit mode. So I have filtered out those predicates using a custom test post-processor.Also, in the Ruby case I've made the
utils/test/PrettyPrintModels.qltest postprocessor available; Swift apparently doesn't support the Models-as-Data extensible predicates, so I couldn't fit its existing MaD support into thecodeql.dataflow.test.ProvenancePathGraph::TestPostProcessing::TranslateProvenanceResults<>interface.Anecdotally, the Copilot "Next Edit Suggestion" feature had some marginal benefit for this PR.