You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+6-1
Original file line number
Diff line number
Diff line change
@@ -21,14 +21,19 @@ cargo nextest run --package circe_lib path::to::module
21
21
## Code Style Guidelines
22
22
-**Formatting**: Use rustfmt, consistent with surrounding code
23
23
-**Naming**: snake_case for functions/variables, CamelCase for types
24
+
-**Variable Shadowing**: Prefer shadowing variables rather than using Hungarian notation (e.g., use `let path = path.to_string_lossy()` instead of `let path_str = path.to_string_lossy()`)
24
25
-**Imports**: Group std lib, external crates, internal modules (alphabetically)
25
26
-**Error Handling**: Use color-eyre with context(), ensure!(), bail!()
26
27
-**Types**: Prefer Builder pattern, derive common traits, use strong types
27
-
-**Documentation**: Comments explain "why" not "what", use proper sentences
28
+
-**Documentation**: Comments explain "why" not "what", use proper sentences. Avoid redundant comments that merely describe what code does - good code should be self-explanatory
28
29
-**Organization**: Modular approach, named module files (not mod.rs)
29
30
-**Testing**: Add integration tests in tests/it/, use test_case macro
30
31
-**Functional Style**: Avoid mutation, prefer functional patterns when possible
31
32
-**Cargo**: Never edit Cargo.toml directly, use cargo edit commands
32
33
-**Conversions**: Use Type::from(value) not let x: Type = value.into()
34
+
-**String Formatting**:
35
+
- For simple variables, use direct interpolation: `"Value: {variable}"` instead of `"Value: {}", variable`
36
+
- For expressions (method calls, etc.), use traditional formatting: `"Value: {}", expression.method()`
37
+
- This project enforces `clippy::uninlined_format_args` for simple variables
33
38
34
39
Set `RUST_LOG=debug` or `RUST_LOG=trace` for detailed logs during development.
0 commit comments