Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: modules-download-mode support #1593

Merged
merged 2 commits into from
Jan 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .golangci.example.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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