build: enable goimports and varcheck linters (#16446)

This commit is contained in:
thomasmodeneis
2018-04-18 00:53:50 +02:00
committed by Felix Lange
parent 7605e63cb9
commit ba1030b6b8
28 changed files with 54 additions and 98 deletions

View File

@ -329,7 +329,10 @@ func doLint(cmdline []string) {
// Run fast linters batched together
configs := []string{
"--vendor",
"--tests",
"--disable-all",
"--enable=goimports",
"--enable=varcheck",
"--enable=vet",
"--enable=gofmt",
"--enable=misspell",
@ -340,7 +343,7 @@ func doLint(cmdline []string) {
// Run slow linters one by one
for _, linter := range []string{"unconvert", "gosimple"} {
configs = []string{"--vendor", "--deadline=10m", "--disable-all", "--enable=" + linter}
configs = []string{"--vendor", "--tests", "--deadline=10m", "--disable-all", "--enable=" + linter}
build.MustRunCommand(filepath.Join(GOBIN, "gometalinter.v2"), append(configs, packages...)...)
}
}