From a6ed81a5c800e1242e4bcefcd5c3e9b70fd10dd7 Mon Sep 17 00:00:00 2001 From: Jieyou Xu Date: Fri, 12 Dec 2025 09:17:18 +0800 Subject: [PATCH] Make test suite formatting remark more precise --- src/conventions.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/conventions.md b/src/conventions.md index 31028f1b9..92ed0825c 100644 --- a/src/conventions.md +++ b/src/conventions.md @@ -21,8 +21,15 @@ Instead, formatting should be done using `./x fmt`. It's a good habit to run Formatting is checked by the `tidy` script. It runs automatically when you do `./x test` and can be run in isolation with `./x fmt --check`. -We do not check that tests under the `tests/` directory are formatted, and -similarly the `./x fmt` command will not format any files under that directory. +> **Note: Formatting and test suites** +> +> Most Rust source files under `tests/` directory are not formatted for reasons +> such as whitespace sensitivity, nature of snapshot tests, location-sensitive +> comments and more. +> +> Consult the `ignore` entries in +> for which test +> files are not formatted. If you want to use format-on-save in your editor, the pinned version of `rustfmt` is built under `build//stage0/bin/rustfmt`.