lint/configured/rust
A linter is configured
Implements lint/configured for rust.
| Severity | warning |
| Tiers | 1, 2 |
| Stacks | rust |
| Scope | each |
| Kind | outcome |
| Source | library v0.6.0 |
| Selected by | fleetlint-recommended@v0.6.0 |
Requirement
Cargo.toml configures the compiler and clippy lints in a [lints] table, [workspace.lints], or inherits the workspace’s with [lints] workspace = true.
Why
Unwrap-driven crashes are the Rust equivalent of swallowed errors, and clippy only reports them when told to.
Fix
Add the [lints] table from the Rust stack profile (fleetlint fix --apply appends it); in a workspace member add [lints] workspace = true.
Agent instruction: Add [lints.rust] and [lints.clippy] tables per the Rust profile to Cargo.toml, or [lints] workspace = true in a workspace member.
fleetlint fix can apply this rule’s fix automatically (1 action(s)).
A finding of this rule points at Cargo.toml.
Sources
- https://csrc.nist.gov/pubs/sp/800/218/final (standard, PW.7.2: Perform the code review and/or code analysis based on the organization’s secure coding standards)
- https://fleetlint.org/baseline/#static-analysis (convention)
- https://doc.rust-lang.org/cargo/reference/manifest.html (spec, The [lints] section)
- https://fleetlint.org/stacks/#rust
Generated by fleetlint docs from catalog v0.6.0.