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
- Run go fmt on all Go files to ensure consistent formatting
- Add official Go tooling commands to CLAUDE.md for code quality
- Update project status to reflect current implementation state
Allow users to specify multiple --name and --match flags in any combination.
Files matching ANY of the specified criteria are collected, following
standard Linux command conventions like grep -e and rsync --include.
Changes:
- Add CompositeMatcher for combining multiple matchers with OR logic
- Update CLI to accept multiple flag values using custom stringSlice type
- Add comprehensive tests for multiple flag combinations
- Update usage message with examples of multiple flag usage
- Add Go implementation with modular architecture
- Support --name flag for exact filename matching
- Support --match flag for directory glob pattern matching
- Create tar.gz and zip archives preserving directory structure
- Handle errors with appropriate exit codes
- Skip files with permission errors gracefully
- Add comprehensive test suite with 11 test cases