Skip to content

Commit 7f0a2b3

Browse files
authored
Instruct Claude to use comments more sparingly (#23181)
1 parent f6416d0 commit 7f0a2b3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,4 @@ When working on ty, PR titles should start with `[ty]` and be tagged with the `t
7676
- Avoid falling back to patterns that require `panic!`, `unreachable!`, or `.unwrap()`. Instead, try to encode those constraints in the type system.
7777
- Prefer let chains (`if let` combined with `&&`) over nested `if let` statements to reduce indentation and improve readability.
7878
- If you *have* to suppress a Clippy lint, prefer to use `#[expect()]` over `[allow()]`, where possible.
79+
- Use comments purposefully. Don't use comments to narrate code, but do use them to explain invariants and why something unusual was done a particular way.

0 commit comments

Comments
 (0)