Skip to content

Commit 6960c52

Browse files
committed
Go: Add support for provenance pretty-printing as a qltest post-process step
1 parent e1329df commit 6960c52

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* @kind test-postprocess
3+
*/
4+
5+
import codeql.dataflow.test.ProvenancePathGraph
6+
import semmle.go.dataflow.ExternalFlow
7+
8+
external predicate queryResults(string relation, int row, int column, string data);
9+
10+
external predicate queryRelations(string relation);
11+
12+
query predicate resultRelations(string relation) { queryRelations(relation) }
13+
14+
module Res = TranslateProvenanceResults<interpretModelForTest/2, queryResults/4>;
15+
16+
from string relation, int row, int column, string data
17+
where Res::results(relation, row, column, data)
18+
select relation, row, column, data

0 commit comments

Comments
 (0)