golangci/golangci-lint · error
go mod tidy: %w
Error message
go mod tidy: %w
What it means
Wrapping error in Builder.Build: the goModTidy step ('go mod tidy' executed in the cloned repository) exited non-zero. Typical causes are unresolvable module dependencies, network failures fetching modules, or incompatible Go versions for the selected golangci-lint version. The go command output is logged as a warning before the error is wrapped.
Source
Thrown at pkg/commands/internal/builder.go:69
b.log.Infof("Adding plugin imports")
err = b.updatePluginsFile()
if err != nil {
return fmt.Errorf("update plugin file: %w", err)
}
b.log.Infof("Adding replace directives")
err = b.addToGoMod(ctx)
if err != nil {
return fmt.Errorf("add to go.mod: %w", err)
}
b.log.Infof("Running go mod tidy")
err = b.goModTidy(ctx)
if err != nil {
return fmt.Errorf("go mod tidy: %w", err)
}
b.log.Infof("Building golangci-lint binary")
binaryName := b.getBinaryName()
err = b.goBuild(ctx, binaryName)
if err != nil {
return fmt.Errorf("build golangci-lint binary: %w", err)
}
b.log.Infof("Moving golangci-lint binary")
err = b.copyBinary(binaryName)
if err != nil {
return fmt.Errorf("move golangci-lint binary: %w", err)
}
View on GitHub (pinned to ed7a235d2d)
Solutions
- Read the logged 'go mod tidy' output for the failing module
- Verify network access to the Go module proxy (or set GOPROXY/GOFLAGS appropriately)
- Ensure the installed Go toolchain satisfies the golangci-lint version's go directive
- Retry, as transient proxy/network errors are common
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at pkg/commands/internal/builder.go:69 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of golangci/golangci-lint@ed7a235d2d (2026-09-02).
Data as JSON: /api/errors/677d674033d53e93.
Report an issue: GitHub.