Summary
Source file count can show 0 in non-git directories because counting relies only on git ls-files.
Current behavior
When scanning a React project that is not inside a Git repository, source file detection fails and count becomes 0.
Reproduction
- Create a React project directory with
.tsx files.
- Do not initialize Git.
- Run
react-doctor ..
Observed:
- output says
Found 0 source files.
Expected behavior
If git-based counting is unavailable, fallback to filesystem traversal with sensible ignores.