Skip to content

Commit 3977843

Browse files
committed
Update documentation to the dev fmt command
1 parent 0c00391 commit 3977843

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

doc/adding_lints.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -345,16 +345,18 @@ list][lint_list].
345345

346346
### Running rustfmt
347347

348-
[Rustfmt](https://github.com/rust-lang/rustfmt) is a tool for formatting Rust code according
349-
to style guidelines. Your code has to be formatted by `rustfmt` before a PR can be merged.
348+
[Rustfmt](https://github.com/rust-lang/rustfmt) is a tool for formatting Rust
349+
code according to style guidelines. Your code has to be formatted by `rustfmt`
350+
before a PR can be merged. Clippy uses nightly `rustfmt` in the CI.
350351

351352
It can be installed via `rustup`:
352353

353354
```bash
354-
rustup component add rustfmt
355+
rustup component add rustfmt --toolchain=nightly
355356
```
356357

357-
Use `cargo fmt --all` to format the whole codebase.
358+
Use `./util/dev fmt` to format the whole codebase. Make sure that `rustfmt` is
359+
installed for the nightly toolchain.
358360

359361
### Debugging
360362

@@ -371,7 +373,7 @@ Before submitting your PR make sure you followed all of the basic requirements:
371373
- [ ] `cargo test` passes locally
372374
- [ ] Executed `util/dev update_lints`
373375
- [ ] Added lint documentation
374-
- [ ] Run `cargo fmt`
376+
- [ ] Run `./util/dev fmt`
375377

376378
### Cheatsheet
377379

0 commit comments

Comments
 (0)