Skip to content

Commit

Permalink
Avoid typechecking stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt committed Jan 30, 2023
1 parent 7366fab commit 064f5b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/typecheck/main.go
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 064f5b9

Please sign in to comment.