MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / calculateOverallScore

Method calculateOverallScore

cmd/gosqlx/cmd/sql_analyzer.go:440–452  ·  view source on GitHub ↗

calculateOverallScore calculates overall analysis score

()

Source from the content-addressed store, hash-verified

438
439// calculateOverallScore calculates overall analysis score
440func (a *SQLAnalyzer) calculateOverallScore() int {
441 securityScore := a.calculateSecurityScore()
442 performanceScore := a.PerformanceScore
443
444 // Weight: 40% security, 40% performance, 20% complexity
445 complexityPenalty := int(a.ComplexityMetrics.ComplexityScore * 2)
446 complexityScore := 100 - complexityPenalty
447 if complexityScore < 0 {
448 complexityScore = 0
449 }
450
451 return (securityScore*40 + performanceScore*40 + complexityScore*20) / 100
452}
453
454// generateRecommendations generates actionable recommendations
455func (a *SQLAnalyzer) generateRecommendations() []string {

Callers 1

AnalyzeMethod · 0.95

Calls 1

Tested by

no test coverage detected