My personal cargo generate template,
shamelessy stolen from rust-github/template,
but enabling many lints.
Usage:
cargo generate ShE3py/rust-templateTo update the lint store:
./check-lints.shIt will ask for new lint levels as needed, e.g.:
warn: lint
invalid_doc_attributesdefault was relaxed fromdenytowarn, while current value isdeny
new value: deny
The .cargo/config.toml will be updated accordingly.
How it works:
- Rustc, Rustdoc and Clippy lints are dumped into
default-lint-levels.stdout; - The
relinttool comparedefault-lint-levels.stdout(current run),default-lint-levels.txt(previous run), andlint-levels.txt(user options) in order to ask the user what level to pick for new and updated lints; - On normal termination,
lint-levels.txtanddefault-lint-levels.txtare updated accordingly; - The
reflagtool update the template with the appropriate flags.