Package tests: also select raw database path

This commit is contained in:
Sauyon Lee
2020-02-07 02:25:26 -08:00
parent 2cb61911c3
commit 5dbebe44f5
2 changed files with 10 additions and 7 deletions

View File

@@ -1,2 +1,2 @@
| package github.com/nonexistent-test-pkg | github.com/nonexistent-test-pkg |
| package semmle.go.Packages | semmle.go.Packages |
| package github.com/nonexistent-test-pkg | github.com/nonexistent-test-pkg | github.com/nonexistent-test-pkg |
| package semmle.go.Packages | semmle.go.Packages | semmle.go.Packages |

View File

@@ -1,8 +1,11 @@
import go
from Package pkg
from Package pkg, string fullpath
where
pkg.getPath().matches("%github.com/nonexistent-test-pkg%")
or
pkg.getPath().matches("semmle.go.Packages%")
select pkg, pkg.getPath()
packages(pkg, _, fullpath, _) and
(
pkg.getPath().matches("%github.com/nonexistent-test-pkg%")
or
pkg.getPath().matches("semmle.go.Packages%")
)
select pkg, pkg.getPath(), fullpath