bevy/rustfmt.toml

13 lines
423 B
TOML
Raw Normal View History

2020-07-28 21:24:03 +00:00
use_field_init_shorthand = true
2020-08-16 03:27:41 +00:00
newline_style = "Unix"
Silence annoying rustfmt config warnings (#1508) Silence those [annoying rustfmt config warnings](https://github.com/bevyengine/bevy/pull/1499/checks?check_run_id=1950282111#step:5:66) that happen because we have unstable rustfmt options in `rustfmt.toml`, but we run it in stable on CI. Thanks to @Ratysz for [calling it out](https://github.com/bevyengine/bevy/pull/1499#issuecomment-783190586). 😄 The final approach we settled on was to comment out the unstable options in `rustfmt.toml`. Those who are using `nightly` may uncomment the unstable options locally if they wish. Once the options stabilize, we can uncomment them again. We also decided that instead of fixing the alias, we would remove the alias entirely so that we do not introduce a custom `.cargo/config.toml` that would conflict with users' custom version of the same file. This means that instead of using a `cargo ci` alias you should use `cargo run -p ci` or `cargo run --package ci` instead. <details><summary>Original Approach (abandoned)</summary> <p> _We decided **not** to go this way..._ In my quest to find a portable way to filter out the warnings I switched the library used to execute commands from `xshell` to `duct` (as advised by the `xshell` project itself when you want to do less simple things). This still uses the "xtask" pattern of using a cargo command alias and a rust project for what would have usually been done with a bash script (on posix), just a different helper library is being used internally. NOTE 1: Also, thanks to some sleuthing by @DJMcNab we were able to fix the broken cargo alias. The issue turned out to be that `.cargo/config.toml` was being ignored because of `.gitignore`. NOTE 2: This is a [known breaking change](https://github.com/bevyengine/bevy/pull/1309#discussion_r564023753) for anyone working on bevy who has their own local `.cargo/config.toml`. </p> </details>
2021-03-07 19:50:17 +00:00
# The following lines may be uncommented on nightly Rust.
# Once these features have stabilized, they should be added to the always-enabled options above.
# unstable_features = true
# imports_granularity = "Crate"
# normalize_comments = true
# these options seem poorly implemented and cause churn, so, try to avoid them
# wrap_comments = true
# comment_width = 100