]> git.lizzy.rs Git - rust.git/commit - src/tools/clippy
Auto merge of #65939 - anp:incremental-rustfmt-rollout, r=Mark-Simulacrum
authorbors <bors@rust-lang.org>
Sun, 22 Dec 2019 13:34:05 +0000 (13:34 +0000)
committerbors <bors@rust-lang.org>
Sun, 22 Dec 2019 13:34:05 +0000 (13:34 +0000)
commit0d2817a439c2ad9fe343f6347eb6d90947893363
treea15bf7cfccfe914a2d3e39fd14a8aa0036d31d78
parent26286c7ad0e8a5efc1e6a8ef88ffd64723112ae8
parentb9e4174d8cf03fdcd0f9f128422b1f565d6b6607
Auto merge of #65939 - anp:incremental-rustfmt-rollout, r=Mark-Simulacrum

Enable incremental rustfmt adoption

Enables an incremental rollout of rustfmt usage within the compiler via a granular ignore configuration and automated enforcement. The decision to format the repository was approved in https://github.com/rust-lang/compiler-team/issues/80#issuecomment-491324079.

This PR includes:

* an `[ignore]` section to `rustfmt.toml` including most of the repository
* `./x.py` downloads rustfmt from a specific nightly (we do not pin to beta or stable as we need unstable features)
* an `./x.py fmt [--check]` command which runs cargo-fmt
* `./x.py fmt --check` runs during the same test step as `src/tools/tidy`, on master, but not on beta or stable as we don't want to depend on nightly rustfmt there.
* a commit to format `src/librustc_fs_util` as an initial target and to ensure enforcement is working from the start