Commit 11f82c3
committed
Fix Go extractor incorrectly excluding packages with .. in relative paths
The Go extractor was incorrectly excluding valid packages when their relative
path from a wantedRoot contained '..' (parent directory references). This
occurred because the extractor checked each package against all wantedRoots,
and most sibling package directories resulted in relative paths like
'../../package/path' which matched the exclusion regex.
This fix introduces a priority root system that checks the module root and
package directory first before falling back to other roots. This ensures
packages are evaluated against the most relevant directories, avoiding false
positives from the '..' exclusion pattern.
Fixes packages being skipped during extraction when located in subdirectories
of a Go module, particularly affecting projects with vendor directories and
multiple nested package structures.1 parent 5d2ddbf commit 11f82c3
1 file changed
+73
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
277 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
278 | 293 | | |
279 | | - | |
280 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
281 | 299 | | |
282 | 300 | | |
283 | 301 | | |
| 302 | + | |
284 | 303 | | |
285 | 304 | | |
286 | 305 | | |
| |||
306 | 325 | | |
307 | 326 | | |
308 | 327 | | |
309 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
310 | 378 | | |
311 | 379 | | |
312 | 380 | | |
| |||
0 commit comments