Skip to content

Commit 68b2bd1

Browse files
committed
chore: remove compatibility layer
1 parent 72f28ac commit 68b2bd1

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

pkg/lint/lintersdb/builder_plugin_go.go

+1-9
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,7 @@ func (b *PluginGoBuilder) loadConfig(cfg *config.Config, name string, settings *
8383
// or the linter does not implement the AnalyzerPlugin interface.
8484
func (b *PluginGoBuilder) getAnalyzerPlugin(cfg *config.Config, path string, settings any) ([]*analysis.Analyzer, error) {
8585
if !filepath.IsAbs(path) {
86-
// Hack for compatibility:
87-
// the previous default (v1) was `cfg` but `fsutils.GetBasePath` defaults on `wd`.
88-
// TODO(ldez): should be removed in v2.
89-
relativePathMode := cfg.Run.RelativePathMode
90-
if relativePathMode == "" {
91-
relativePathMode = fsutils.RelativePathModeCfg
92-
}
93-
94-
basePath, err := fsutils.GetBasePath(context.Background(), relativePathMode, cfg.GetConfigDir())
86+
basePath, err := fsutils.GetBasePath(context.Background(), cfg.Run.RelativePathMode, cfg.GetConfigDir())
9587
if err != nil {
9688
return nil, fmt.Errorf("get base path: %w", err)
9789
}

0 commit comments

Comments
 (0)