test(oxide): cover gitignored source globs#20349
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAdds a regression test for scanning explicit deep globs inside a gitignored folder. The test creates an internal 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
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 |
Confidence Score: 4/5Safe to merge — this is a pure test addition with no changes to production code. The new test correctly covers the positive case from #18870 and won't break anything. The negative assertion (the Only Reviews (1): Last reviewed commit: "test(oxide): cover gitignored source glo..." | Re-trigger Greptile |
| ( | ||
| "storage/app/private/cms_content/some-slug/ignored.jsx", | ||
| "content-['SHOULD-NOT-EXIST-IN-OUTPUT']", | ||
| ), |
There was a problem hiding this comment.
Negative assertion tests extension filtering, not gitignore bypass
ignored.jsx would never appear in candidates regardless of whether the gitignore override is working — the glob pattern **/*.html filters it out on extension alone. If the scanner regresses to ignoring all files in gitignored directories (including HTML ones), this assertion still passes. A stronger negative check would be an .html file that matches the extension but lives outside the explicit @source glob (e.g., storage/app/private/cms_content/some-slug/other.html with a second top-level .gitignore entry covering that tree), so a failing gitignore bypass would cause the positive assertion to fail rather than being masked by extension filtering.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| ( | ||
| "storage/app/private/cms_content/some-slug/0.html", | ||
| "content-['cms/some-slug/0.html']", | ||
| ), |
There was a problem hiding this comment.
The file content string
content-['cms/some-slug/0.html'] doesn't echo the actual file path (storage/app/private/cms_content/some-slug/0.html). Every surrounding test uses the full relative path as the content marker (e.g. ("src/foo.html", "content-['src/foo.html']")), so readers expecting that convention may be confused about what path is being asserted.
| ( | |
| "storage/app/private/cms_content/some-slug/0.html", | |
| "content-['cms/some-slug/0.html']", | |
| ), | |
| ( | |
| "storage/app/private/cms_content/some-slug/0.html", | |
| "content-['storage/app/private/cms_content/some-slug/0.html']", | |
| ), |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Adds regression coverage for explicit
@sourcedeep globs that point inside a gitignored directory.The test mirrors the
storage/app/private/cms_content/**/*.htmlshape from #18870 and verifies Tailwind scans matching HTML files without scanning non-matching files in the same ignored tree.Test plan
cargo test -p tailwindcss-oxide it_should_scan_explicit_deep_globs_inside_gitignored_folders -- --nocapture git diff --check cargo fmt --checkRefs #18870