File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
go/ql/lib/semmle/go/dataflow Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -312,9 +312,13 @@ private predicate elementSpec(
312
312
/**
313
313
* Gets the string for the package path corresponding to `p`, if one exists.
314
314
*
315
- * If `p` has `$THISVERSION` at the end then we remove that and do not attempt
316
- * to match any other versions of the same package. If `p` contains a major
317
- * version suffix (like "/v2") then we also do not attempt to match any
315
+ * We attempt to account for major version suffixes as follows: if `p` is
316
+ * `github.com/a/b/c/d` then we will return any path for a package that was
317
+ * imported which matches that, possibly with a major version suffix in it,
318
+ * so if `github.com/a/b/c/d/v2` or `github.com/a/b/v3/c/d` were imported then
319
+ * they will be in the results. There are two situations where we do not do
320
+ * this: (1) when `p` already contains a major version suffix; (2) if `p` has
321
+ * `$THISVERSION` at the end (which we remove).
318
322
*/
319
323
bindingset [ p]
320
324
private string interpretPackage ( string p ) {
You can’t perform that action at this time.
0 commit comments