Documentation
¶
Overview ¶
Package clone holds the neutral value types for clone-detection results so that core-ring packages (e.g. internal/metrics) can consume them without importing an adapter under internal/extract. The clone-detection adapter (internal/extract/clones) produces these; metrics reads them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ModulePairs ¶
ModulePairs converts a slice of Clusters to canonical cross-module pairs using an injected key function. Same-module pairs are skipped. Each pair is returned in sorted order ([a,b] where a <= b) and the result slice is deduped and sorted for determinism.
The key function is typically fileToModuleKey(file, lang) from the metrics package, injected at the call site so this package stays free of that import.