Skip to content

Commit ca558ca

Browse files
committed
Closes #154: set typecheker sizes as types.SizesFor(build.Default.Compiler, build.Default.GOARCH)
1 parent 8156b9f commit ca558ca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/lint/load.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55
"go/build"
66
"go/parser"
7+
"go/types"
78
"os"
89
"path/filepath"
910
"strings"
@@ -174,6 +175,9 @@ func loadWholeAppIfNeeded(linters []linter.Config, cfg *config.Config,
174175
AllowErrors: true, // Try to analyze partially
175176
ParserMode: parser.ParseComments, // AST will be reused by linters
176177
TypeCheckFuncBodies: getTypeCheckFuncBodies(&cfg.Run, linters, pkgProg, log),
178+
TypeChecker: types.Config{
179+
Sizes: types.SizesFor(build.Default.Compiler, build.Default.GOARCH),
180+
},
177181
}
178182

179183
var loaderArgs []string

0 commit comments

Comments
 (0)