feat: add --only-include flag for replacement include behavior#24
Merged
seatedro merged 3 commits intoseatedro:masterfrom Aug 11, 2025
Merged
feat: add --only-include flag for replacement include behavior#24seatedro merged 3 commits intoseatedro:masterfrom
seatedro merged 3 commits intoseatedro:masterfrom
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: This PR is stacked on #23 & should be reviewed after that one is merged.
This PR adds
--only-includeflag to support replacement-style include behavior alongside existing additive behavior.Problem: Users had conflicting expectations for -i/--include:
--includesuggests it should add additional patterns (include patterns + source files) -- fixed in fix: make include patterns additive to source detection #23Solution:
--includeremains additive:glimpse -i "*.yml"→ yml files + source files--only-includeprovides replacement:glimpse --only-include "*.yml"→ only yml filesTesting: All tests pass including new test coverage for both filtering modes.