codeql icon indicating copy to clipboard operation
codeql copied to clipboard

Convert remaining `{go,swift,ruby}-code-scanning.qls` query tests to `.qlref`

Open d10c opened this issue 5 months ago • 0 comments
trafficstars

Converts the remaining {go,swift,ruby}-code-scanning.qls query tests to .qlref.

Example prior work: https://github.com/github/codeql/pull/18848

In the Go IncorrectIntegerConversion case, the #select, edges, and nodes query 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.ql test postprocessor available; Swift apparently doesn't support the Models-as-Data extensible predicates, so I couldn't fit its existing MaD support into the codeql.dataflow.test.ProvenancePathGraph::TestPostProcessing::TranslateProvenanceResults<> interface.

Anecdotally, the Copilot "Next Edit Suggestion" feature had some marginal benefit for this PR.

d10c avatar Jun 19 '25 09:06 d10c