rustfmt is a formatter for Rust. You can enable the rustfmt formatter with:Documentation Index
Fetch the complete documentation index at: https://trunk-4cab4936-sam-gutentag-flaky-tests-new-monitors.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Auto Enabling
rustfmt will be auto-enabled if any Rust files are present.Settings
rustfmt supports the following config files:rustfmt.toml.rustfmt.toml
.trunk/configs and trunk check will still find them. See Moving Linters for more info. Trunk Code Quality provides a default .rustfmt.toml if your project does not already have one.
Usage Notes
We currently use the version ofrustfmt packaged with rust, so for rustfmt version, specify your Rust version (for example rustfmt@1.61.0).
If you have edition in your cargo.toml, rustfmt also needs the same information in .rustfmt.toml in your repo root. For example, your .rustfmt.toml might contain:
Links
- rustfmt site
- rustfmt Trunk Code Quality integration source
- Trunk Code Quality’s open source plugins repo