]> git.lizzy.rs Git - rust.git/commit
Add --dump-default-config and --dump-minimal-config.
authorMichael Killough <michaeljkillough@gmail.com>
Thu, 18 May 2017 05:56:49 +0000 (12:56 +0700)
committerMichael Killough <michaeljkillough@gmail.com>
Thu, 18 May 2017 05:56:49 +0000 (12:56 +0700)
commit31c8fb4e7663687d2822c5e6d41c47f1143aef0f
treec0c542da62093a6f868859f8000e853b42cb7957
parent3f34ff82297a4f1d5f4052fff5ff44bd28504a3e
Add --dump-default-config and --dump-minimal-config.

 - `--dump-default-config` outputs the default configuration to the
   specified file as TOML and then exits.
 - `--dump-minimal-config` is checked after formatting files as normal.
   If present, any configuration options that were checked during
   formatting are written to the specified file as TOML.
 - These options were added only to `rustfmt`, not to `cargo fmt`. They
   can be specified when using `cargo fmt` by placing them after `--`.
 - It would have been nice if the filename was optional, so you could
   run just `rusfmt --dump-minimal-config build.rs` to have it output to
   `rustfmt.toml`. However, this doesn't do what you might expect: it
   outputs the config to `build.rs`!
src/bin/rustfmt.rs