-
Couldn't load subscription status.
- Fork 656
chore: tell coderabbit to ignore snapshots and non-code files #2903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
WalkthroughA new path_filters configuration is added to .coderabbit.yml with two entries: one to exclude snapshot directories and another to target source files within the src directory. This narrows the scope of files processed by the configuration. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2903 +/- ##
=======================================
Coverage 88.53% 88.53%
=======================================
Files 372 372
Lines 46179 46179
Branches 3741 3741
=======================================
Hits 40884 40884
Misses 5261 5261
Partials 34 34 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.coderabbit.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: test: node@22
- GitHub Check: test: node@18
- GitHub Check: test: node@20
- GitHub Check: Analyze (javascript)
| - "!**/__snapshots__/**" | ||
| - "**/src/**" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Reorder filters so snapshots actually stay out.
With Git/CodeRabbit sparse checkout semantics the last matching glob decides inclusion. Because the include "**/src/**" comes after the exclude, any path like packages/foo/src/__snapshots__/bar.snap matches the include last and slips back in. Move the include ahead of the exclude (or add a more specific trailing !**/src/**/__snapshots__/**) so snapshots remain filtered.
Apply this diff to fix the ordering:
path_filters:
- - "!**/__snapshots__/**"
- - "**/src/**"
+ - "**/src/**"
+ - "!**/__snapshots__/**"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - "!**/__snapshots__/**" | |
| - "**/src/**" | |
| path_filters: | |
| - "**/src/**" | |
| - "!**/__snapshots__/**" |
🤖 Prompt for AI Agents
In .coderabbit.yml around lines 2 to 3, the include/exclude ordering lets src
snapshots slip back in; move the include "**/src/**" above the exclude
"!**/__snapshots__/**" so the exclude is applied last, or alternatively add a
more specific trailing exclusion "!**/src/**/__snapshots__/**" (or both) so
paths like packages/foo/src/__snapshots__/bar.snap remain filtered out.
CodeRabbit has many noisy comments related to code snapshots. Since this is a large part of our manual review process, it is okay for AI to ignore them.
Summary by CodeRabbit