mirror of
https://github.com/github/codeql.git
synced 2026-02-08 03:01:10 +01:00
add test for predicateExpr
This commit is contained in:
@@ -37,3 +37,11 @@ module Buildins {
|
||||
|
||||
predicate regexpCapture(string s) { "foo".regexpCapture("\\w", 1) = s }
|
||||
}
|
||||
|
||||
cached
|
||||
newtype TApiNode = MkRoot()
|
||||
|
||||
private predicate edge(TApiNode a, TApiNode b) { a = b }
|
||||
|
||||
cached
|
||||
int distanceFromRoot(TApiNode nd) = shortestDistances(MkRoot/0, edge/2)(_, nd, result)
|
||||
|
||||
@@ -22,3 +22,7 @@ getTarget
|
||||
| packs/src/SrcThing.qll:5:3:5:8 | PredicateCall | packs/src/SrcThing.qll:8:1:8:30 | ClasslessPredicate bar |
|
||||
dependsOn
|
||||
| packs/src/qlpack.yml:1:1:1:4 | ql-testing-src-pack | packs/lib/qlpack.yml:1:1:1:4 | ql-testing-lib-pack |
|
||||
exprPredicate
|
||||
| Foo.qll:24:22:24:31 | predicate | Foo.qll:22:3:22:32 | ClasslessPredicate myThing0 |
|
||||
| Foo.qll:26:22:26:31 | predicate | Foo.qll:20:3:20:54 | ClasslessPredicate myThing2 |
|
||||
| Foo.qll:47:65:47:70 | predicate | Foo.qll:44:9:44:56 | ClasslessPredicate edge |
|
||||
|
||||
@@ -3,3 +3,5 @@ import ql
|
||||
query AstNode getTarget(Call call) { result = call.getTarget() }
|
||||
|
||||
query YAML::QLPack dependsOn(YAML::QLPack pack) { result = pack.getADependency() }
|
||||
|
||||
query Predicate exprPredicate(PredicateExpr expr) { result = expr.getResolvedPredicate() }
|
||||
|
||||
Reference in New Issue
Block a user