Skip to content

Commit 1e5ba1e

Browse files
authored
fix: modules-download-mode support (#1593)
1 parent 76c4521 commit 1e5ba1e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.golangci.example.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ run:
5151
# If invoked with -mod=vendor, the go command assumes that the vendor
5252
# directory holds the correct copies of dependencies and ignores
5353
# the dependency descriptions in go.mod.
54-
modules-download-mode: readonly|release|vendor
54+
modules-download-mode: readonly|vendor|mod
5555

5656
# Allow multiple parallel golangci-lint instances running.
5757
# If false (default) - golangci-lint acquires file lock on start.

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ require (
7070
github.com/valyala/quicktemplate v1.6.3
7171
golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634 // indirect
7272
golang.org/x/text v0.3.4 // indirect
73-
golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c
73+
golang.org/x/tools v0.0.0-20210105210202-9ed45478a130
7474
gopkg.in/yaml.v2 v2.4.0
7575
honnef.co/go/tools v0.0.1-2020.1.6
7676
mvdan.cc/gofumpt v0.0.0-20201129102820-5c11c50e9475

go.sum

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/lint/load.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (cl *ContextLoader) makeBuildFlags() ([]string, error) {
104104
mod := cl.cfg.Run.ModulesDownloadMode
105105
if mod != "" {
106106
// go help modules
107-
allowedMods := []string{"release", "readonly", "vendor"}
107+
allowedMods := []string{"mod", "readonly", "vendor"}
108108
var ok bool
109109
for _, am := range allowedMods {
110110
if am == mod {

0 commit comments

Comments
 (0)