Feature Request
Replace naive folder matching in insight/utils.py with standard Git ignore pattern matching using pathspec.
Problem with Current Implementation
Currently, get_ignored_dirs() only matches exact top-level directory names. It cannot handle:
- Standard glob patterns (e.g.,
*.min.js, *.log, tests/**)
- File path patterns (e.g.,
src/generated/*)
- Negation patterns (e.g.,
!important.py)
Proposed Solution
- Add
pathspec to requirements.txt and setup.py.
- Load patterns from
.gitignore and .insightignore.
- Use
pathspec.PathSpec.from_lines("gitwildmatch", patterns) to filter discovered files and directories.
Feature Request
Replace naive folder matching in
insight/utils.pywith standard Git ignore pattern matching usingpathspec.Problem with Current Implementation
Currently,
get_ignored_dirs()only matches exact top-level directory names. It cannot handle:*.min.js,*.log,tests/**)src/generated/*)!important.py)Proposed Solution
pathspectorequirements.txtandsetup.py..gitignoreand.insightignore.pathspec.PathSpec.from_lines("gitwildmatch", patterns)to filter discovered files and directories.