Skip to content

Commit aa35bd7

Browse files
committed
Fix bug removing "vendor/" from package paths
1 parent 6dbdc9e commit aa35bd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/ql/lib/semmle/go/Packages.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Package extends @package {
1414
/** Gets the path of this package. */
1515
string getPath() {
1616
exists(string fullPath | packages(this, _, fullPath, _) |
17-
result = fullPath.regexpReplaceAll("^.*/vendor/", "")
17+
result = fullPath.regexpReplaceAll("^.*\\bvendor/", "")
1818
)
1919
}
2020

0 commit comments

Comments
 (0)