Skip to content
Permalink
Browse files
fix(internal/godocfx): filter out test packages from other modules (#…
…3197)

Test packages don't have module set, so they aren't filtered out in the
existing check. The order of packages isn't defined as far as I can
tell. So, we may not know to skip a package when we first see it.
  • Loading branch information
tbpg committed Nov 11, 2020
1 parent e392e61 commit 1d397aa8b41f8f980cba1d3dcc50f11e4d4f4ca0
Showing with 11 additions and 0 deletions.
  1. +11 −0 internal/godocfx/parse.go
@@ -453,6 +453,17 @@ func loadPackages(glob, workingDir string) ([]pkgInfo, error) {
result := []pkgInfo{}

for _, pkgPath := range pkgNames {
// Check if pkgPath has prefix of skipped module.
skip := false
for skipModule := range skippedModules {
if strings.HasPrefix(pkgPath, skipModule) {
skip = true
break
}
}
if skip {
continue
}
parsedFiles := []*ast.File{}
fset := token.NewFileSet()
for _, f := range pkgFiles[pkgPath] {

0 comments on commit 1d397aa

Please sign in to comment.