{"record":{"id":"47ee1590d2b69684","repo":"golangci/golangci-lint","slug":"build-linters-w","errorCode":null,"errorMessage":"build linters: %w","messagePattern":"build linters: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/lint/lintersdb/manager.go","lineNumber":53,"sourceCode":"\n// NewManager creates a new Manager.\n// This constructor will call the builders to build and store the linters.\nfunc NewManager(log logutils.Log, cfg *config.Config, builders ...Builder) (*Manager, error) {\n\tm := &Manager{\n\t\tlog:       log,\n\t\tdebugf:    logutils.Debug(logutils.DebugKeyEnabledLinters),\n\t\tnameToLCs: make(map[string][]*linter.Config),\n\t}\n\n\tm.cfg = cfg\n\tif cfg == nil {\n\t\tm.cfg = config.NewDefault()\n\t}\n\n\tfor _, builder := range builders {\n\t\tlinters, err := builder.Build(m.cfg)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"build linters: %w\", err)\n\t\t}\n\n\t\tm.linters = append(m.linters, linters...)\n\t}\n\n\tfor _, lc := range m.linters {\n\t\tfor _, name := range lc.AllNames() {\n\t\t\tm.nameToLCs[name] = append(m.nameToLCs[name], lc)\n\t\t}\n\t}\n\n\terr := NewValidator(m).Validate(m.cfg)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn m, nil\n}","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/golangci/golangci-lint/blob/ed7a235d2d771152056fdc142a9855567c5796a9/pkg/lint/lintersdb/manager.go#L35-L71","documentation":"Wrapping error in lintersdb.NewManager: one of the builder.Build(cfg) calls (plugin builders or the standard builder) returned an error while constructing the linter set at startup. The manager aborts creation; the wrapped error names the failing builder step (e.g. plugin loading or config validation).","triggerScenarios":"Thrown at pkg/lint/lintersdb/manager.go:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error to identify the failing builder","Fix custom plugin configuration/path issues if a plugin builder failed","Validate the linters configuration section for invalid entries"],"exampleFix":null,"handlingStrategy":"fallback","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"}