fix: match nested review sources before the node_modules exclude - #302
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe review file-list call now places the dependency exclusion before supplied source patterns. A regression test checks that a nested source glob finds its file without reporting problems. ChangesReview source matching
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to This fix lets the review command match nested source paths that previously reported no available files. The change is small, tested, and narrowly scoped, so there are no known merge-blocking risks. Architecture SummaryArchitecture risk: 🟡 Medium · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
Reliability and maintainability
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit f8932af
☁️ Nx Cloud last updated this comment at |
commit: |
| '-z', | ||
| '--', | ||
| ...patterns, | ||
| // Git drops matches when one include precedes the exclude (#301). |
There was a problem hiding this comment.
please remove this comment
LadyBluenotes
left a comment
There was a problem hiding this comment.
The test mentions excluding installed dependencies but doesn’t create any. Could you add a dependency fixture under a matching glob and assert that the snapshot includes the source file but excludes the dependency?
d1946f4 to
f8932af
Compare
Good point, test added |
🎯 Changes
Fixes #301.
reviewlists the files of each source withgit ls-files -- <source> <node_modules exclude>. When one include comes before the exclude, Git drops matches for some nested paths, so a valid source such aspackages/client/src/**reportsSource matched no available files.list()now passesdependencyExcludebefore the patterns.diff()is unchanged:git diffreturns the right files in both orders.The new test in
review.test.tsfails without the fix and passes with it.✅ Checklist
pnpm run test:pr(runpnpm build:allfirst).🚀 Release Impact
Summary by CodeRabbit
node_modulesremain excluded from the review snapshot. This resolves cases where a valid nested source was incorrectly reported as having no available files, while preserving the existing exclusion of dependency files from review results.