Skip to content

Commit ebd7b1c

Browse files
fix: Fix opengrep config file name
1 parent 799aab5 commit ebd7b1c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

config/config.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,22 @@ func (c *ConfigType) Tools() map[string]*plugins.ToolInfo {
182182
return c.tools
183183
}
184184

185+
// toolNameAliases maps legacy tool names to their current equivalents
186+
var toolNameAliases = map[string]string{
187+
"semgrep": "opengrep",
188+
}
189+
185190
func (c *ConfigType) AddTools(configs []plugins.ToolConfig) error {
186191
// Get the plugin manager to access tool configurations
187192
pluginManager := plugins.GetPluginManager()
188193

194+
// Resolve any legacy tool name aliases
195+
for i := range configs {
196+
if alias, ok := toolNameAliases[configs[i].Name]; ok {
197+
configs[i].Name = alias
198+
}
199+
}
200+
189201
// Ensure all required runtimes are present before processing tools
190202
for _, toolConfig := range configs {
191203
// Get the tool's plugin configuration to access runtime info

0 commit comments

Comments
 (0)