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

Function score

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

Source from the content-addressed store, hash-verified

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

Callers 1

resolveFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected