MCPcopy Create free account
hub / github.com/JordanCoin/codemap / AnalyzeImpact

Function AnalyzeImpact

scanner/git.go:165–176  ·  view source on GitHub ↗

AnalyzeImpact checks which changed files are imported by other files Uses ast-grep to extract actual imports for accuracy

(root string, changedFiles []FileInfo)

Source from the content-addressed store, hash-verified

163// AnalyzeImpact checks which changed files are imported by other files
164// Uses ast-grep to extract actual imports for accuracy
165func AnalyzeImpact(root string, changedFiles []FileInfo) []ImpactInfo {
166 if len(changedFiles) == 0 {
167 return nil
168 }
169
170 // Scan all files to get their imports using ast-grep
171 analyses, err := ScanForDeps(root)
172 if err != nil {
173 return nil
174 }
175 return AnalyzeImpactFromAnalyses(changedFiles, analyses)
176}
177
178// AnalyzeImpactFromAnalyses computes impact using a pre-computed ast-grep scan,
179// so callers that already hold the analyses can avoid a redundant full-repo

Callers 5

mainFunction · 0.92
handleGetDiffFunction · 0.92
TestAnalyzeImpactEmptyFunction · 0.85

Calls 2

ScanForDepsFunction · 0.85