Loading tutorials
rustfmt through Cargo, how to check formatting without changing files, and what the tool does and does not touch.3 min readcargo fmt and read its effect on a file. It covers how to change rustfmt's defaults with a configuration file, which options are safe to use, and what goes wrong most often.3 min readcargo fmt and have a project with a rustfmt.toml, as covered in the earlier chapters. It shows how to protect individual pieces of code from rustfmt.3 min readcargo clippy and read its warnings. It also assumes you know what a lint is: a check that reports code that is likely wrong or unidiomatic. Clippy has several hundred lints, and it sorts them into groups. Each group has a default level and a purpose. Knowing the gr3 min readcargo clippy and read its output, and that you know the lint groups from the previous chapter. Here you will learn how to decide what happens when a lint fires.3 min readcargo clippy and read its warnings, and that your project is in Git. Many Clippy warnings come with a ready-made code change, and Cargo can apply those changes for you. You will learn when that is safe, how to run it, and how to review the result.3 min readcargo clippy, read its diagnostics, and set lint levels with attributes or the [lints] table. Lint levels decide whether a lint fires. clippy.toml decides how a lint behaves once it is enabled.3 min readcargo clippy, and know the four lint levels (allow, warn, deny, forbid). It also assumes Cargo 1.74 or newer, the first version with the [lints] table.3 min readcargo fmt and cargo clippy locally and know how lint levels work (allow, warn, deny). It covers making both tools mandatory on every push, so style and lint problems cannot reach the main branch.3 min readcargo fmt and cargo clippy from a terminal and know what rustfmt.toml and the [lints] table do. Here you move both tools into your editor, so problems show up while you type instead of in CI.3 min read