fix(rules): include the macOS Chrome cache - #92
Conversation
Chrome stores its regenerable cache under Library/Caches on macOS, outside both existing Windows and Linux patterns. Add the platform path while pinning a neighboring profile History file as unknown so the safe rule cannot drift into user data.
Muawiya-contact
left a comment
There was a problem hiding this comment.
Nice one, this is exactly right. Pattern's correct, and I like that you pinned the Application Support/History case so the rule can't creep into profile data later. Rebased it locally and ran the suite: clippy clean, 59 pass.
Two things:
- Move your changelog line up to
[Unreleased]. v0.2.0 went out today, so that### Fixedblock is now inside the released section. It rebases cleanly and lands in the wrong place without warning you. Code Cachesits right next toCachein that same folder and still comes out unknown, so it stays invisible in the report. Worth adding**/library/caches/google/chrome/*/code cache/**while you're in here, unless you'd rather keep this PR to one thing.
Second one's your call, the changelog isn't.
|
Merged current main, moved the changelog entry to Unreleased, and included macOS Chrome |
There was a problem hiding this comment.
All sorted. Changelog's in the right place, and you picked up Code Cache with a test case for it.
Leaving GPUCache out was the right call, by the way. On macOS it sits under Application Support next to the profile data, not in Caches, so a rule for it would be reaching into exactly what chrome_profile_data_is_not_safe_to_remove is there to stop.
Approved CI and ran it here too: 12 checks green, fmt and clippy clean, 63 tests pass.
Welcome to Coding Moves, and thanks for sticking with the back and forth on this one 🙌 You've got #91 and #93 open too — #93 just needs the changelog line moved, #91 needs one with_context and it's done.
After those, the issues here are labelled by difficulty if you want to keep going, and there are a few other Coding Moves repos worth a look.
And if you're enjoying the project, a ⭐ on the repo helps people find it 🚀
Fixes #88.
What & why
Adds Chrome's macOS
~/Library/Caches/Google/Chrome/<Profile>/Cachepath to the existing safe browser-cache rule. This changes matching files from unknown to safe; a neighboring Chrome History path remains unknown in the regression coverage.Checklist
cargo fmt --alland strict clippy pass fordiskern-coreanddiskern-cli