* What `status` and `init` say about an index whose last run didn't end well: * null for a complete index, and for one another process is rebuilding right * now, whose `indexing` is that run's own, not an interrupted one's.
(indexState: string | null, rebuildInProgress: boolean)
| 760 | * now, whose `indexing` is that run's own, not an interrupted one's. |
| 761 | */ |
| 762 | function unfinishedIndexWarning(indexState: string | null, rebuildInProgress: boolean): string | null { |
| 763 | if (rebuildInProgress) return null; |
| 764 | switch (indexState) { |
| 765 | case 'indexing': |
| 766 | return 'The last index run never finished (killed mid-index?) — the index is truncated. Re-run "codegraph index".'; |
| 767 | case 'partial': |
| 768 | return 'The last index run silently dropped files — the index is partial. Re-run "codegraph index".'; |
| 769 | case 'failed': |
| 770 | return 'The last index run failed — results may be incomplete. Re-run "codegraph index".'; |
| 771 | default: |
| 772 | return null; |
| 773 | } |
| 774 | } |
| 775 | |
| 776 | /** |
| 777 | * How the last index run of an initialized project ended, read the way |
no outgoing calls
no test coverage detected