Skip to content

Commit

Permalink
Merge pull request kubernetes#115386 from liggitt/automated-cherry-pi…
Browse files Browse the repository at this point in the history
…ck-of-#115382-upstream-release-1.26

Automated cherry pick of kubernetes#115382: Avoid typechecking stdlib
  • Loading branch information
k8s-ci-robot authored Feb 3, 2023
2 parents dfda43d + 15b48cd commit 6d4b94f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/typecheck/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ var (
func newConfig(platform string) *packages.Config {
platSplit := strings.Split(platform, "/")
goos, goarch := platSplit[0], platSplit[1]
mode := packages.NeedName | packages.NeedFiles | packages.NeedTypes | packages.NeedSyntax | packages.NeedDeps | packages.NeedImports
mode := packages.NeedName | packages.NeedFiles | packages.NeedTypes | packages.NeedSyntax | packages.NeedDeps | packages.NeedImports | packages.NeedModule
if *defuses {
mode = mode | packages.NeedTypesInfo
}
Expand Down Expand Up @@ -204,7 +204,7 @@ func (c *collector) verify(plat string) ([]string, error) {

for _, pkg := range allList {
if len(pkg.GoFiles) > 0 {
if len(pkg.Errors) > 0 {
if len(pkg.Errors) > 0 && (pkg.PkgPath == "main" || strings.Contains(pkg.PkgPath, ".")) {
errors = append(errors, pkg.Errors...)
}
}
Expand Down

0 comments on commit 6d4b94f

Please sign in to comment.