* 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)
| 750 | * now, whose `indexing` is that run's own, not an interrupted one's. |
| 751 | */ |
| 752 | function unfinishedIndexWarning(indexState: string | null, rebuildInProgress: boolean): string | null { |
| 753 | if (rebuildInProgress) return null; |
| 754 | switch (indexState) { |
| 755 | case 'indexing': |
| 756 | return 'The last index run never finished (killed mid-index?) — the index is truncated. Re-run "codegraph index".'; |
| 757 | case 'partial': |
| 758 | return 'The last index run silently dropped files — the index is partial. Re-run "codegraph index".'; |
| 759 | case 'failed': |
| 760 | return 'The last index run failed — results may be incomplete. Re-run "codegraph index".'; |
| 761 | default: |
| 762 | return null; |
| 763 | } |
| 764 | } |
| 765 | |
| 766 | /** |
| 767 | * How the last index run of an initialized project ended, read the way |
no outgoing calls
no test coverage detected