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