Close #187: disable typecheck for golangci.com by default

This commit is contained in:
Denis Isaev 2018-08-08 23:25:34 +03:00
parent d3eb3ed74d
commit 9ec959f08e
No known key found for this signature in database
GPG Key ID: A36A0EC8E27A1A01

View File

@ -2,6 +2,7 @@ package lintersdb
import ( import (
"fmt" "fmt"
"os"
"sort" "sort"
"strings" "strings"
"sync" "sync"
@ -197,7 +198,9 @@ func GetAllSupportedLinterConfigs() []linter.Config {
golinters.Varcheck{}.Name(): true, golinters.Varcheck{}.Name(): true,
golinters.Ineffassign{}.Name(): true, golinters.Ineffassign{}.Name(): true,
golinters.Deadcode{}.Name(): true, golinters.Deadcode{}.Name(): true,
golinters.TypeCheck{}.Name(): true,
// don't typecheck for golangci.com: too many troubles
golinters.TypeCheck{}.Name(): os.Getenv("GOLANGCI_COM_RUN") == "",
} }
return enableLinterConfigs(lcs, func(lc *linter.Config) bool { return enableLinterConfigs(lcs, func(lc *linter.Config) bool {
return enabled[lc.Linter.Name()] return enabled[lc.Linter.Name()]