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

Function capBlastRadiusProject

blast_radius.go:555–565  ·  view source on GitHub ↗
(project scanner.Project, max int)

Source from the content-addressed store, hash-verified

553}
554
555func capBlastRadiusProject(project scanner.Project, max int) scanner.Project {
556 if max >= len(project.Files) {
557 return project
558 }
559 project.Files = append([]scanner.FileInfo(nil), project.Files[:max]...)
560 // Impact is an independent, usage-sorted list keyed by basename; filter it to
561 // the files actually shown rather than slicing it by the changed-file cap,
562 // which would drop or mis-attribute the diff impact footer.
563 project.Impact = filterImpactToShownFiles(project.Impact, project.Files)
564 return project
565}
566
567// filterImpactToShownFiles keeps only impact entries whose basename matches a
568// shown changed file (or its directory, for package-style imports).

Callers 1

buildBlastRadiusBundleFunction · 0.85

Calls 1

filterImpactToShownFilesFunction · 0.85

Tested by

no test coverage detected