buld: enable goconst linter (#15566)

This commit is contained in:
Zach
2017-11-30 10:22:26 +00:00
committed by Felix Lange
parent e37f7be97e
commit 73067fd24f
2 changed files with 14 additions and 4 deletions

View File

@ -323,7 +323,15 @@ func doLint(cmdline []string) {
build.MustRunCommand(filepath.Join(GOBIN, "gometalinter.v1"), "--install")
// Run fast linters batched together
configs := []string{"--vendor", "--disable-all", "--enable=vet", "--enable=gofmt", "--enable=misspell"}
configs := []string{
"--vendor",
"--disable-all",
"--enable=vet",
"--enable=gofmt",
"--enable=misspell",
"--enable=goconst",
"--min-occurrences=6", // for goconst
}
build.MustRunCommand(filepath.Join(GOBIN, "gometalinter.v1"), append(configs, packages...)...)
// Run slow linters one by one