All clippy lints are set to deny level — the project will not compile with violations.
Key restrictions:
- No
unwrap()— use?operator oranyhow/thiserrorerror handling - No
todo!(),unimplemented!(),unreachable!()— handle all cases - No
unsafecode - No wildcard imports (
use foo::*) - No single-character variable names (minimum 2 characters)
- Functions: max 70 lines, max 5 arguments, max cognitive complexity 20
- Use
anyhow::Resultfor application-level code (binaries, CLI) - Use
thiserror::Errorfor library error types that callers will match on - Propagate errors with
?— neverunwrap()orexpect()
Keep main.rs as a thin entry point — argument parsing, logger init, and a call into
library code. All logic belongs in lib.rs (and its modules). main.rs is excluded from
coverage, so anything there is untested by default.
Minimum 70% coverage enforced via cargo-tarpaulin. Run just cover to check.
main.rs is excluded — keep it thin and move testable logic to lib.rs.
- Rust files: 500 lines max
- Markdown files: 200 lines max
When a file exceeds the limit, split it into modules or separate documents.
- Run
just checkbefore submitting — it runs clippy, tests, and file size checks - Run
just fmtto format code - Ensure
just covermeets the 70% threshold