Repository · Maintainability
Cargo target directory not ignored by git
rust_doctor::repo::unignored_build_output
Add the target directory to .gitignore so build artifacts stay out of the repository; the directory judged is Cargo's, including a custom target-dir set in .cargo/config.toml, and any ignore source git honors counts.
- Category
- Maintainability
- Default level
- warn
- Tier
- P3
- Producer
- Repository
- Diff scope
- line
Not a defect when
Every build of the repository writes to a target directory outside the checkout through CARGO_TARGET_DIR or a user-level Cargo config, so no build output can ever appear inside it.
What it reads
What git tracks.
Tier
Lowest tier: real, and rarely urgent.
The tier bounds how severe a rule may be; its category bounds the tier.Diff scope
The changed line itself.
What--scope contextual looks at to decide whether a change caused the finding.Change it
Turn it off, or make it blocking, without touching the code it flags:
rust-doctor --rule rust_doctor::repo::unignored_build_output=off .
rust-doctor --rule rust_doctor::repo::unignored_build_output=error .