Skip to content

Commit

Permalink
fix: modules-download-mode support (#1593)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Jan 7, 2021
1 parent 76c4521 commit 1e5ba1e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .golangci.example.yml
Expand Up @@ -51,7 +51,7 @@ run:
# If invoked with -mod=vendor, the go command assumes that the vendor
# directory holds the correct copies of dependencies and ignores
# the dependency descriptions in go.mod.
modules-download-mode: readonly|release|vendor
modules-download-mode: readonly|vendor|mod

# Allow multiple parallel golangci-lint instances running.
# If false (default) - golangci-lint acquires file lock on start.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -70,7 +70,7 @@ require (
github.com/valyala/quicktemplate v1.6.3
golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634 // indirect
golang.org/x/text v0.3.4 // indirect
golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c
golang.org/x/tools v0.0.0-20210105210202-9ed45478a130
gopkg.in/yaml.v2 v2.4.0
honnef.co/go/tools v0.0.1-2020.1.6
mvdan.cc/gofumpt v0.0.0-20201129102820-5c11c50e9475
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/lint/load.go
Expand Up @@ -104,7 +104,7 @@ func (cl *ContextLoader) makeBuildFlags() ([]string, error) {
mod := cl.cfg.Run.ModulesDownloadMode
if mod != "" {
// go help modules
allowedMods := []string{"release", "readonly", "vendor"}
allowedMods := []string{"mod", "readonly", "vendor"}
var ok bool
for _, am := range allowedMods {
if am == mod {
Expand Down

0 comments on commit 1e5ba1e

Please sign in to comment.