From ca558ca5712e2862abdfdb3f9e100a3593390b91 Mon Sep 17 00:00:00 2001 From: Denis Isaev Date: Sun, 29 Jul 2018 22:01:29 +0300 Subject: [PATCH] Closes #154: set typecheker sizes as types.SizesFor(build.Default.Compiler, build.Default.GOARCH) --- pkg/lint/load.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/lint/load.go b/pkg/lint/load.go index 1a6bea06..294c545e 100644 --- a/pkg/lint/load.go +++ b/pkg/lint/load.go @@ -4,6 +4,7 @@ import ( "fmt" "go/build" "go/parser" + "go/types" "os" "path/filepath" "strings" @@ -174,6 +175,9 @@ func loadWholeAppIfNeeded(linters []linter.Config, cfg *config.Config, AllowErrors: true, // Try to analyze partially ParserMode: parser.ParseComments, // AST will be reused by linters TypeCheckFuncBodies: getTypeCheckFuncBodies(&cfg.Run, linters, pkgProg, log), + TypeChecker: types.Config{ + Sizes: types.SizesFor(build.Default.Compiler, build.Default.GOARCH), + }, } var loaderArgs []string