* 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[] })
| 1209 | * wrong, what to do, and naming up to three of the files. |
| 1210 | */ |
| 1211 | function 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] |
no test coverage detected