Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
> <https://github.com/rust-lang/rust/blob/main/rustfmt.toml> for which test
> files are not formatted.
Comment on lines +30 to +32
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark: Not listing any test suites here because rustfmt.toml is the source of truth, specific tests can also get ignored, not just on a test suite granularity.


If you want to use format-on-save in your editor, the pinned version of
`rustfmt` is built under `build/<target>/stage0/bin/rustfmt`.
Expand Down
Loading