Skip to content

Lint Configuration

Clippy runs with pedantic + nursery + cargo lint groups. All are set to warn with priority -1.

Denied lints (hard errors):

LintReason
unwrap_usedUse ? or explicit match
expect_usedUse ? or explicit match
panicReturn errors instead
todoNo placeholder code
unimplementedNo placeholder code
dbg_macroNo debug prints in production
print_stdoutUse logging; binary exempts itself with #[allow]
print_stderrUse logging; binary exempts itself with #[allow]

Allowed lints:

LintReason
missing_errors_docOpt-in documentation
missing_panics_docOpt-in documentation
module_name_repetitionsCommon in Rust API design
must_use_candidateApplied manually where meaningful
redundant_pub_crateAllow pub(crate) for clarity

Clippy thresholds (from clippy.toml):

ThresholdValue
too-many-lines-threshold100
too-many-arguments-threshold7
cognitive-complexity-threshold25
excessive-nesting-threshold4
max-struct-bools3
max-fn-params-bools3
pass-by-value-size-limit256 bytes
type-complexity-threshold250

Test exemptions: allow-unwrap-in-tests, allow-expect-in-tests, allow-dbg-in-tests, allow-print-in-tests are all true.