MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / score

Function score

src/resolution/frameworks/java.ts:119–123  ·  view source on GitHub ↗
(n: Node)

Source from the content-addressed store, hash-verified

117 // profile variants when both exist), then by alphabetical path so the
118 // pick is deterministic across reindexes.
119 const score = (n: Node) => {
120 const base = n.filePath.split('/').pop() ?? '';
121 const isBase = /^(application|bootstrap)\.(yml|yaml|properties)$/i.test(base);
122 return (isBase ? 0 : 1) * 1000 + base.length;
123 };
124 const best = candidates.reduce((a, b) => (score(a) <= score(b) ? a : b));
125 return { original: ref, targetNodeId: best.id, confidence: 0.75, resolvedBy: 'framework' };
126 }

Callers 1

resolveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected