35 matches across 1 files for func main path:processor/history_coupling.go lang:Go lang:Go lang:Go
snippet_mode: auto · sorted by relevance
processor/history_coupling.go GO 35 matches · showing 5 view file →
69// 100%; multiplied by high test-file complexity that buries the real work.
70// Volume keeps the heavyweight couplings on top and matches --hotspots.
71func (c CouplingCount) WeightedScore() float64 {
72 return float64(c.Shared) * float64(min(c.ComplexityA, c.ComplexityB))
73}
· · ·
76// co-change first, then degree, then path. Shared by the raw sort and used as
77// the tiebreak under weighted ranking.
78func lessCouplingRaw(a, b CouplingCount) bool {
79 if a.Shared != b.Shared {
80 return a.Shared > b.Shared
· · ·
92// when the Cognitive global is on (matching --hotspots), cyclomatic otherwise.
93// A path absent from HEAD contributes zero, so it can never lift a pair's score.
94func headComplexity(head HeadSnapshot, path string) int64 {
95 hf, ok := head.Files[path]
96 if !ok {
· · ·
107// for the human-facing table only; the raw counts sit beside it so the number
108// is never a black box. Returns 0 when the union is empty.
109func (c CouplingCount) Degree() float64 {
110 union := c.CommitsA + c.CommitsB - c.Shared
111 if union <= 0 {
· · ·
141type pairKey struct{ a, b string }
142
143func newCouplingObserver() *couplingObserver {
144 return &couplingObserver{
145 maxFilesPerCommit: CouplingMaxFilesPerCommit,
+ 30 more matches in this file
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.