Skip to content

Commit a6ed81a

Browse files
committed
Make test suite formatting remark more precise
1 parent a335827 commit a6ed81a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/conventions.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,15 @@ Instead, formatting should be done using `./x fmt`. It's a good habit to run
2121
Formatting is checked by the `tidy` script. It runs automatically when you do
2222
`./x test` and can be run in isolation with `./x fmt --check`.
2323

24-
We do not check that tests under the `tests/` directory are formatted, and
25-
similarly the `./x fmt` command will not format any files under that directory.
24+
> **Note: Formatting and test suites**
25+
>
26+
> Most Rust source files under `tests/` directory are not formatted for reasons
27+
> such as whitespace sensitivity, nature of snapshot tests, location-sensitive
28+
> comments and more.
29+
>
30+
> Consult the `ignore` entries in
31+
> <https://github.com/rust-lang/rust/blob/main/rustfmt.toml> for which test
32+
> files are not formatted.
2633
2734
If you want to use format-on-save in your editor, the pinned version of
2835
`rustfmt` is built under `build/<target>/stage0/bin/rustfmt`.

0 commit comments

Comments
 (0)