Skip to content

Commit c80dceb

Browse files
reverted default_version from enigma plugin and code review changes
1 parent bdb7819 commit c80dceb

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

cmd/analyze.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func validateToolName(toolName string) error {
277277
return nil
278278
}
279279

280-
func runToolByTooName(toolName string, workDirectory string, pathsToCheck []string, autoFix bool, outputFile string, outputFormat string, tool *plugins.ToolInfo, runtime *plugins.RuntimeInfo) error {
280+
func runToolByName(toolName string, workDirectory string, pathsToCheck []string, autoFix bool, outputFile string, outputFormat string, tool *plugins.ToolInfo, runtime *plugins.RuntimeInfo) error {
281281
switch toolName {
282282
case "eslint":
283283
binaryPath := runtime.Binaries[tool.Runtime]
@@ -332,7 +332,12 @@ func runTool(workDirectory string, toolName string, pathsToCheck []string, outpu
332332
}
333333

334334
if tool == nil || !isToolInstalled {
335-
fmt.Println("Tool configuration not found, adding and installing...")
335+
if tool == nil {
336+
fmt.Println("Tool configuration not found, adding and installing...")
337+
}
338+
if !isToolInstalled {
339+
fmt.Println("Tool is not installed, installing...")
340+
}
336341
err := config.InstallTool(toolName, tool, "")
337342
if err != nil {
338343
return fmt.Errorf("failed to install %s: %w", toolName, err)
@@ -361,7 +366,7 @@ func runTool(workDirectory string, toolName string, pathsToCheck []string, outpu
361366
runtime = config.Config.Runtimes()[tool.Runtime]
362367
}
363368
}
364-
return runToolByTooName(toolName, workDirectory, pathsToCheck, autoFix, outputFile, outputFormat, tool, runtime)
369+
return runToolByName(toolName, workDirectory, pathsToCheck, autoFix, outputFile, outputFormat, tool, runtime)
365370
}
366371

367372
var analyzeCmd = &cobra.Command{

plugins/tools/codacy-enigma-cli/plugin.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: codacy-enigma-cli
22
description: Enigma CLI
3-
default_version: "0.0.1-main.11.91cf89e"
43
download:
54
url_template: "https://github.com/codacy/codacy-enigma-cli-releases/releases/download/{{.Version}}/codacy-enigma-cli-releases_{{.Version}}_{{.OS}}_{{.Arch}}.tar.gz"
65
binaries:

0 commit comments

Comments
 (0)