Skip to content

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

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions go/ql/test/query-tests/Security/CWE-681/FilterTestResults.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* @kind test-postprocess
* @description Remove the query predicates that differ based on 32/64-bit architecture. This should leave behind `invalidModelRowAdd` and `testFailures` in case of test failures.
*/

/**
* The input test results: query predicate `relation` contains `data` at (`row`, `column`).
*/
external private predicate queryResults(string relation, int row, int column, string data);

/** Holds if the test output's query predicate `relation` contains `data` at (`row`, `column`). */
query predicate results(string relation, int row, int column, string data) {
queryResults(relation, row, column, data) and
not relation in ["#select", "nodes", "edges"]
}
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
invalidModelRow
testFailures
Loading
Loading