Skip to content

Fix include rules not working for subdirectory paths#4

Merged
andyfischer merged 3 commits intomainfrom
claude/fix-include-subdirectories-ILqgS
Apr 7, 2026
Merged

Fix include rules not working for subdirectory paths#4
andyfischer merged 3 commits intomainfrom
claude/fix-include-subdirectories-ILqgS

Conversation

@andyfischer
Copy link
Copy Markdown
Contributor

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

claude added 3 commits April 7, 2026 16:19
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
@andyfischer andyfischer merged commit ab6e123 into main Apr 7, 2026
3 of 4 checks 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