{"record":{"id":"503167a43521a540","repo":"golangci/golangci-lint","slug":"get-base-path-w-503167","errorCode":null,"errorMessage":"get base path: %w","messagePattern":"get base path: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/lint/lintersdb/builder_plugin_go.go","lineNumber":88,"sourceCode":"\n\tlinterConfig := linter.NewConfig(customLinter).\n\t\tWithGroups(config.GroupStandard).\n\t\tWithLoadForGoAnalysis().\n\t\tWithURL(settings.OriginalURL)\n\n\treturn linterConfig, nil\n}\n\n// getAnalyzerPlugin loads a private linter as specified in the config file,\n// loads the plugin from a .so file,\n// and returns the 'AnalyzerPlugin' interface implemented by the private plugin.\n// An error is returned if the private linter cannot be loaded\n// or the linter does not implement the AnalyzerPlugin interface.\nfunc (b *PluginGoBuilder) getAnalyzerPlugin(cfg *config.Config, path string, settings any) ([]*analysis.Analyzer, error) {\n\tif !filepath.IsAbs(path) {\n\t\tbasePath, err := fsutils.GetBasePath(context.Background(), cfg.Run.RelativePathMode, cfg.GetConfigDir())\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"get base path: %w\", err)\n\t\t}\n\n\t\t// resolve non-absolute paths relative to config file's directory\n\t\tpath = filepath.Join(basePath, path)\n\t}\n\n\t//nolint:staticcheck,nolintlint // Ignore because the implementation on Windows returns nil\n\tplug, err := plugin.Open(path)\n\t//nolint:staticcheck,nolintlint // Ignore because the implementation on Windows returns nil\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tanalyzers, err := b.lookupPlugin(plug, settings)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"lookup plugin %s: %w\", path, err)\n\t}\n","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/golangci/golangci-lint/blob/ed7a235d2d771152056fdc142a9855567c5796a9/pkg/lint/lintersdb/builder_plugin_go.go#L70-L106","documentation":"Wrapping error in PluginGoBuilder.getAnalyzerPlugin: fsutils.GetBasePath failed while resolving the plugin's non-absolute path relative to the config directory / relative-path mode. The plugin cannot be located, so loading aborts before plugin.Open.","triggerScenarios":"Thrown at pkg/lint/lintersdb/builder_plugin_go.go:88 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an absolute path for the plugin in the custom linter settings","Verify the config directory and relative-path-mode settings","Check the wrapped error for the base-path resolution failure"],"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"}