{"record":{"id":"677d674033d53e93","repo":"golangci/golangci-lint","slug":"go-mod-tidy-w","errorCode":null,"errorMessage":"go mod tidy: %w","messagePattern":"go mod tidy: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/commands/internal/builder.go","lineNumber":69,"sourceCode":"\tb.log.Infof(\"Adding plugin imports\")\n\n\terr = b.updatePluginsFile()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"update plugin file: %w\", err)\n\t}\n\n\tb.log.Infof(\"Adding replace directives\")\n\n\terr = b.addToGoMod(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"add to go.mod: %w\", err)\n\t}\n\n\tb.log.Infof(\"Running go mod tidy\")\n\n\terr = b.goModTidy(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"go mod tidy: %w\", err)\n\t}\n\n\tb.log.Infof(\"Building golangci-lint binary\")\n\n\tbinaryName := b.getBinaryName()\n\n\terr = b.goBuild(ctx, binaryName)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"build golangci-lint binary: %w\", err)\n\t}\n\n\tb.log.Infof(\"Moving golangci-lint binary\")\n\n\terr = b.copyBinary(binaryName)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"move golangci-lint binary: %w\", err)\n\t}\n","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/golangci/golangci-lint/blob/ed7a235d2d771152056fdc142a9855567c5796a9/pkg/commands/internal/builder.go#L51-L87","documentation":"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.","triggerScenarios":"Thrown at pkg/commands/internal/builder.go:69 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ed7a235d2d771152056fdc142a9855567c5796a9","analyzedAt":"2026-09-02T18:47:33.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}