Fix include rules not working for subdirectory paths#4
Merged
andyfischer merged 3 commits intomainfrom Apr 7, 2026
Merged
Conversation
When an include rule targeted a subdirectory (e.g. "include frontend/out"), the parent directory was skipped because it didn't exactly match the pattern. Now we check if a directory is an ancestor of any include pattern and traverse into it without assuming all contents are included. https://claude.ai/code/session_01SnpQmtb8Xt5WVJcUUXKd6W
- Add picomatch dependency for glob matching in file-manifest - Update shouldInclude() and findLeftoverFiles() to use picomatch.isMatch() instead of exact string comparison - Fix parseRulesFile to join all tag attrs, since @facetlayer/qc splits on * - Add couldContainMatch() to traverse ancestor directories of glob patterns - Make exclude rules take priority over include rules (needed for overlapping glob patterns like include src/**/*.ts + exclude **/*.test.ts) - Add tests for *, **, and mixed glob/exact patterns https://claude.ai/code/session_01SnpQmtb8Xt5WVJcUUXKd6W
- file-manifest README: document glob patterns, subdirectory includes, rule priority, and updated API example - file-manifest CHANGELOG: created with unreleased changes - goobernetes README: add glob examples to file inclusion/exclusion section - goobernetes CHANGELOG: add unreleased section https://claude.ai/code/session_01SnpQmtb8Xt5WVJcUUXKd6W
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.
When an include rule targeted a subdirectory (e.g. "include frontend/out"),
the parent directory was skipped because it didn't exactly match the pattern.
Now we check if a directory is an ancestor of any include pattern and traverse
into it without assuming all contents are included.
https://claude.ai/code/session_01SnpQmtb8Xt5WVJcUUXKd6W