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

Function describeFilesMissingSymbols

src/bin/codegraph.ts:1211–1229  ·  view source on GitHub ↗

* The `status` warnings for indexed files whose symbols are missing although * their content is current (#2335, #2336): one line per group, saying what is * wrong, what to do, and naming up to three of the files.

(health: { needsReindex: string[]; parseErrors: string[] })

Source from the content-addressed store, hash-verified

1209 * wrong, what to do, and naming up to three of the files.
1210 */
1211function describeFilesMissingSymbols(health: { needsReindex: string[]; parseErrors: string[] }): string[] {
1212 const dash = getGlyphs().dash;
1213 const lines: string[] = [];
1214 const reindex = health.needsReindex.length;
1215 if (reindex > 0) {
1216 lines.push(
1217 `${formatNumber(reindex)} ${reindex === 1 ? 'file is missing its' : 'files are missing their'} symbols ${dash} ` +
1218 `run "codegraph sync" to re-index ${reindex === 1 ? 'it' : 'them'}: ${samplePaths(health.needsReindex)}`
1219 );
1220 }
1221 const unparsed = health.parseErrors.length;
1222 if (unparsed > 0) {
1223 lines.push(
1224 `${formatNumber(unparsed)} ${unparsed === 1 ? 'file could not be parsed, so its symbols are' : 'files could not be parsed, so their symbols are'} ` +
1225 `missing: ${samplePaths(health.parseErrors)} ${dash} "codegraph files --json" shows the errors`
1226 );
1227 }
1228 return lines;
1229}
1230
1231/**
1232 * codegraph status [path]

Callers 1

mainFunction · 0.85

Calls 4

getGlyphsFunction · 0.90
samplePathsFunction · 0.85
pushMethod · 0.80
formatNumberFunction · 0.70

Tested by

no test coverage detected