1Rustfmt
2=======
3
4`rustfmt <https://github.com/rust-lang/rustfmt>`__ is the tool for Rust coding style.
5
6Run Locally
7-----------
8
9The mozlint integration of rustfmt can be run using mach:
10
11.. parsed-literal::
12
13    $ mach lint --linter rustfmt <file paths>
14
15
16Configuration
17-------------
18
19To enable rustfmt on new directory, add the path to the include
20section in the `rustfmt.yml <https://searchfox.org/mozilla-central/source/tools/lint/rustfmt.yml>`_ file.
21
22
23Autofix
24-------
25
26Rustfmt is reformatting the code by default. To highlight the results, we are using
27the ``--check`` option.
28
29Sources
30-------
31
32* `Configuration (YAML) <https://searchfox.org/mozilla-central/source/tools/lint/rustfmt.yml>`_
33* `Source <https://searchfox.org/mozilla-central/source/tools/lint/rust/__init__.py>`_
34