* 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[] })
| 1249 | * wrong, what to do, and naming up to three of the files. |
| 1250 | */ |
| 1251 | function describeFilesMissingSymbols(health: { needsReindex: string[]; parseErrors: string[] }): string[] { |
| 1252 | const dash = getGlyphs().dash; |
| 1253 | const lines: string[] = []; |
| 1254 | const reindex = health.needsReindex.length; |
| 1255 | if (reindex > 0) { |
| 1256 | lines.push( |
| 1257 | `${formatNumber(reindex)} ${reindex === 1 ? 'file is missing its' : 'files are missing their'} symbols ${dash} ` + |
| 1258 | `run "codegraph sync" to re-index ${reindex === 1 ? 'it' : 'them'}: ${samplePaths(health.needsReindex)}` |
| 1259 | ); |
| 1260 | } |
| 1261 | const unparsed = health.parseErrors.length; |
| 1262 | if (unparsed > 0) { |
| 1263 | lines.push( |
| 1264 | `${formatNumber(unparsed)} ${unparsed === 1 ? 'file could not be parsed, so its symbols are' : 'files could not be parsed, so their symbols are'} ` + |
| 1265 | `missing: ${samplePaths(health.parseErrors)} ${dash} "codegraph files --json" shows the errors` |
| 1266 | ); |
| 1267 | } |
| 1268 | return lines; |
| 1269 | } |
| 1270 | |
| 1271 | /** |
| 1272 | * codegraph status [path] |
no test coverage detected