build: enable modules before getting gometalinter

To keep things simple - force using modules to install specific version
of gometalinter. Without this, current working directory and GO111MODULE
environment variable must be used to decide whether to use versioned or
unversioned `go get`.
This commit is contained in:
Tomasz Zdybał 2019-05-21 18:52:53 +02:00
parent 68e311ebe0
commit 0997c242b2
No known key found for this signature in database
GPG key ID: F157D3BD6E2EED66

View file

@ -333,6 +333,7 @@ func doLint(cmdline []string) {
packages = flag.CommandLine.Args()
}
// Get metalinter and install all supported linters
os.Setenv("GO111MODULE", "on")
build.MustRun(goTool("get", "gopkg.in/alecthomas/kingpin.v3-unstable@63abe20a23e29e80bbef8089bd3dee3ac25e5306"))
build.MustRun(goTool("get", "github.com/alecthomas/gometalinter@v3.0.0"))
build.MustRunCommand(filepath.Join(GOBIN, "gometalinter"), "--install")