Merge pull request #15450 from karalabe/lint-gofmt-misspell

build: enable gofmt and misspell linters
This commit is contained in:
Péter Szilágyi 2017-11-10 11:09:47 +02:00 committed by GitHub
commit febfea7af2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -322,7 +322,7 @@ func doLint(cmdline []string) {
build.MustRun(goTool("get", "gopkg.in/alecthomas/gometalinter.v1")) build.MustRun(goTool("get", "gopkg.in/alecthomas/gometalinter.v1"))
build.MustRunCommand(filepath.Join(GOBIN, "gometalinter.v1"), "--install") build.MustRunCommand(filepath.Join(GOBIN, "gometalinter.v1"), "--install")
configs := []string{"--vendor", "--disable-all", "--enable=vet"} // Add additional linters to the slice with "--enable=linter-name" configs := []string{"--vendor", "--disable-all", "--enable=vet", "--enable=gofmt", "--enable=misspell"}
build.MustRunCommand(filepath.Join(GOBIN, "gometalinter.v1"), append(configs, packages...)...) build.MustRunCommand(filepath.Join(GOBIN, "gometalinter.v1"), append(configs, packages...)...)
} }