Skip to content

Commit 513ec16

Browse files
authored
Merge pull request github#16796 from owen-mc/go/fix/package-vendor
Go: Fix bug removing "vendor/" from package paths
2 parents 4a448f4 + aa35bd7 commit 513ec16

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)