Skip to content

Commit 044878e

Browse files
committed
add dart analyzer to analyze after rebase
1 parent c97592d commit 044878e

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ go.work.sum
2727
# Codacy CLI
2828
cli-v2
2929
codacy-cli
30+
31+
32+
#Ignore cursor AI rules
33+
.cursor/rules/codacy.mdc

cmd/analyze.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ func runPylintAnalysis(workDirectory string, pathsToCheck []string, outputFile s
226226
}
227227
}
228228

229+
func runDartAnalyzer(workDirectory string, pathsToCheck []string, outputFile string, outputFormat string) {
230+
dartanalyzer := config.Config.Tools()["dartanalyzer"]
231+
tools.RunDartAnalyzer(workDirectory, dartanalyzer, pathsToCheck, outputFile, outputFormat, apiToken, provider, owner, repository)
232+
}
233+
229234
var analyzeCmd = &cobra.Command{
230235
Use: "analyze",
231236
Short: "Runs all configured linters.",
@@ -312,6 +317,8 @@ func runTool(workDirectory string, toolName string, args []string, outputFile st
312317
runPmdAnalysis(workDirectory, args, outputFile, outputFormat)
313318
case "pylint":
314319
runPylintAnalysis(workDirectory, args, outputFile, outputFormat)
320+
case "dartanalyzer":
321+
runDartAnalyzer(workDirectory, args, outputFile, outputFormat)
315322
default:
316323
log.Printf("Warning: Unsupported tool: %s\n", toolName)
317324
}

cmd/init.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,9 @@ func cleanConfigDirectory(toolsConfigDir string) error {
462462
}
463463

464464
const (
465-
ESLint string = "f8b29663-2cb2-498d-b923-a10c6a8c05cd"
466-
Trivy string = "2fd7fbe0-33f9-4ab3-ab73-e9b62404e2cb"
467-
PMD string = "9ed24812-b6ee-4a58-9004-0ed183c45b8f"
468-
PyLint string = "31677b6d-4ae0-4f56-8041-606a8d7a8e61"
465+
ESLint string = "f8b29663-2cb2-498d-b923-a10c6a8c05cd"
466+
Trivy string = "2fd7fbe0-33f9-4ab3-ab73-e9b62404e2cb"
467+
PMD string = "9ed24812-b6ee-4a58-9004-0ed183c45b8f"
468+
PyLint string = "31677b6d-4ae0-4f56-8041-606a8d7a8e61"
469+
DartAnalyzer string = "d203d615-6cf1-41f9-be5f-e2f660f7850f"
469470
)

0 commit comments

Comments
 (0)