1
0
Fork 0
collect/collector
Andrew Tomaka e63426f7c7 Add directory filtering with --include-dir and --exclude-dir flags
Implement comprehensive directory filtering functionality that allows users
to control which directories are traversed during file collection.

Features:
- --include-dir: Only traverse directories matching specified patterns
- --exclude-dir: Skip directories matching specified patterns
- Support for glob patterns (e.g., 'temp-*', 'project-*')
- Multiple filters with OR logic (like existing --name/--match flags)
- Include filters take precedence over exclude filters when both specified
- Seamless integration with existing file matching functionality

Implementation:
- Add DirectoryFilter interface with Include/Exclude/Composite implementations
- Update Collector to accept optional DirectoryFilter and use filepath.SkipDir
- Add CLI flags and argument parsing for new directory filtering options
- Comprehensive test suite with 7 new test cases covering all scenarios
2025-06-12 22:12:45 -04:00
..
collector.go Add directory filtering with --include-dir and --exclude-dir flags 2025-06-12 22:12:45 -04:00
matcher.go Add directory filtering with --include-dir and --exclude-dir flags 2025-06-12 22:12:45 -04:00