Add a CLAUDE.md (#17517)
I'm a bit annoyed to make it tool-specific, and that it's needed in the first place, but 🤷♀️ I think it'll make a difference so here we go. This has a few items inspired by https://github.com/astral-sh/ruff/blob/main/CLAUDE.md
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
- Read CONTRIBUTING.md for guidelines on how to run tools
|
||||
- ALWAYS attempt to add a test case for changed behavior
|
||||
- PREFER integration tests, e.g., at `it/...` over unit tests
|
||||
- When making changes for Windows from Unix, use `cargo xwin clippy` to check compilation
|
||||
- NEVER perform builds with the release profile, unless asked or reproducing performance issues
|
||||
- PREFER running specific tests over running the entire test suite
|
||||
- AVOID using `panic!`, `unreachable!`, `.unwrap()`, unsafe code, and clippy rule ignores
|
||||
- PREFER patterns like `if let` to handle fallibility
|
||||
- ALWAYS write `SAFETY` comments following our usual style when writing `unsafe` code
|
||||
- PREFER `#[expect()]` over `[allow()]` if clippy must be disabled
|
||||
- PREFER let chains (`if let` combined with `&&`) over nested `if let` statements
|
||||
Reference in New Issue
Block a user