Closes #154: set typecheker sizes as types.SizesFor(build.Default.Compiler, build.Default.GOARCH)
This commit is contained in:
parent
8156b9f7e9
commit
ca558ca571
@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"go/build"
|
"go/build"
|
||||||
"go/parser"
|
"go/parser"
|
||||||
|
"go/types"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
@ -174,6 +175,9 @@ func loadWholeAppIfNeeded(linters []linter.Config, cfg *config.Config,
|
|||||||
AllowErrors: true, // Try to analyze partially
|
AllowErrors: true, // Try to analyze partially
|
||||||
ParserMode: parser.ParseComments, // AST will be reused by linters
|
ParserMode: parser.ParseComments, // AST will be reused by linters
|
||||||
TypeCheckFuncBodies: getTypeCheckFuncBodies(&cfg.Run, linters, pkgProg, log),
|
TypeCheckFuncBodies: getTypeCheckFuncBodies(&cfg.Run, linters, pkgProg, log),
|
||||||
|
TypeChecker: types.Config{
|
||||||
|
Sizes: types.SizesFor(build.Default.Compiler, build.Default.GOARCH),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var loaderArgs []string
|
var loaderArgs []string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user