Rust Fmt¶
New in version 3.0.
The Rust toolchain includes an automatic formatter (rustfmt) which all code is expected to be run through in order to maintain consistency throughout a codebase.
This tool will report any syntax errors in Rust source code, or report if the files are incorrectly formatted, suggesting to the user that they should reformat it.
Supported File Types¶
The following are supported by this tool.
Rust:
*.rs
Installation¶
This tool requires that Rust and rustfmt are installed on the system running the Review Bot worker.
To learn more, see the documentation on installing Rust and installing rustfmt.
Configuration¶
Rust Fmt Location¶
If the rustfmt command is in a non-standard location, and can’t be
found in Review Bot’s PATH
environment variable, then you’ll need to
specify the path in the
Review Bot worker config file:
exe_paths = {
'rustfmt': '/path/to/rustfmt',
}
You will need to restart the Review Bot worker after making this change.
Enabling Rust Fmt in Review Board¶
You’ll need to add a Review Bot configuration in Review Board (see Tool Configurations).
There are no configuration options available for this tool.