Skip to content

Fallback source file counting for non-git directories #53

@Taiki92777

Description

@Taiki92777

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

  1. Create a React project directory with .tsx files.
  2. Do not initialize Git.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions