Skip to content

Conversation

@dchristle
Copy link
Contributor

@dchristle dchristle commented Jul 26, 2025

Note: This PR is stacked on #23 & should be reviewed after that one is merged.

This PR adds --only-include flag to support replacement-style include behavior alongside existing additive behavior.

Problem: Users had conflicting expectations for -i/--include:

Solution:

  • --include remains additive: glimpse -i "*.yml" → yml files + source files
  • --only-include provides replacement: glimpse --only-include "*.yml" → only yml files
  • Mutual exclusion validation prevents conflicting usage
  • Updated help text clarifies the behavioral difference

Testing: All tests pass including new test coverage for both filtering modes.

dchristle and others added 3 commits July 25, 2025 13:02
- Fix include patterns not working for non-source file types (e.g., *.peb)
- Refactor filtering logic into centralized should_process_file() function
- Implement union behavior: files match if source OR include patterns match
- Add comprehensive test coverage for pattern interactions and edge cases
- Add --only-include CLI flag that replaces source detection entirely
- Keep existing --include flag as additive behavior (source files + patterns)
- Add validation to prevent both flags being used together + tests
@seatedro seatedro merged commit 45f9ccf into seatedro:master Aug 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants