From fcdd01989db58e0d4422a36f7313ae5781786cc1 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 9 Nov 2017 14:10:37 -0500 Subject: [PATCH] Configurations: document reorder_extern_crates settings --- Configurations.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/Configurations.md b/Configurations.md index 55bf9f6bb26d..f504b8e74688 100644 --- a/Configurations.md +++ b/Configurations.md @@ -1552,6 +1552,68 @@ use sit; See also [`reorder_imports`](#reorder_imports). +## `reorder_extern_crates` + +Reorder `extern crate` statements alphabetically + +- **Default value**: `true` +- **Possible values**: `true`, `false` + +#### `true` (default): + +```rust +extern crate dolor; +extern crate ipsum; +extern crate lorem; +extern crate sit; +``` + +#### `false`: + +```rust +extern crate lorem; +extern crate ipsum; +extern crate dolor; +extern crate sit; +``` + +See also [`reorder_extern_crates_in_group`](#reorder_extern_crates_in_group). + +## `reorder_extern_crates_in_group` + +Reorder `extern crate` statements in group + +- **Default value**: `true` +- **Possible values**: `true`, `false` + +**Note:** This option takes effect only when [`reorder_imports`](#reorder_imports) is set to `true`. + +#### `true` (default): + +```rust +extern crate a; +extern crate b; + +extern crate dolor; +extern crate ipsum; +extern crate lorem; +extern crate sit; +``` + +#### `false`: + +```rust +extern crate b; +extern crate a; + +extern crate lorem; +extern crate ipsum; +extern crate dolor; +extern crate sit; +``` + +See also [`reorder_extern_crates`](#reorder_extern_crates). + ## `single_line_if_else_max_width` Maximum line length for single line if-else expressions.