From 6447e0d072cb74f006faa25b4badfc6af355b430 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 9 Nov 2017 14:10:37 -0500 Subject: [PATCH 1/6] Configurations: markup `max_width` --- Configurations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configurations.md b/Configurations.md index 4e7bdc3b457c..a47e94975047 100644 --- a/Configurations.md +++ b/Configurations.md @@ -477,7 +477,7 @@ Don't reformat anything ## `error_on_line_overflow` -Error if unable to get all lines within max_width +Error if unable to get all lines within `max_width` - **Default value**: `true` - **Possible values**: `true`, `false` From 1bb927e46fe3f5cefed7714bed2feb756227467e Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 9 Nov 2017 14:10:37 -0500 Subject: [PATCH 2/6] Configurations: add colons to example section titles --- Configurations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Configurations.md b/Configurations.md index a47e94975047..9cd8355e7b04 100644 --- a/Configurations.md +++ b/Configurations.md @@ -1152,7 +1152,7 @@ use foo::{xxx, yyy, zzz}; use foo::{aaa, bbb, ccc, ddd, eee, fff}; ``` -#### `"HorizontalVertical"` +#### `"HorizontalVertical"`: ```rust use foo::{xxx, yyy, zzz}; @@ -1165,7 +1165,7 @@ use foo::{aaa, fff}; ``` -#### `"Vertical"` +#### `"Vertical"`: ```rust use foo::{xxx, From 4d547b38a7b668e01ff3cdfe568e9f1609b65345 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 9 Nov 2017 14:10:37 -0500 Subject: [PATCH 3/6] Configurations: fix where_density documentation The default is actually `Vertical`. --- Configurations.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Configurations.md b/Configurations.md index 9cd8355e7b04..619900d18499 100644 --- a/Configurations.md +++ b/Configurations.md @@ -2123,10 +2123,27 @@ let lorem = ipsum.map(|dolor| dolor.sit())?; Density of a where clause. -- **Default value**: `"CompressedIfEmpty"` +- **Default value**: `"Vertical"` - **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"` -#### `"CompressedIfEmpty"` (default): +#### `"Vertical"` (default): + +```rust +trait Lorem { + fn ipsum(dolor: Dolor) -> Sit + where Dolor: Eq; + + fn ipsum(dolor: Dolor) -> Sit + where Dolor: Eq + { + // body + } +} +``` + +**Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`. + +#### `"CompressedIfEmpty"`: ```rust trait Lorem { @@ -2175,23 +2192,6 @@ trait Lorem { **Note:** `where_density = "Tall"` currently produces the same output as `where_density = "Vertical"`. -#### `"Vertical"`: - -```rust -trait Lorem { - fn ipsum(dolor: Dolor) -> Sit - where Dolor: Eq; - - fn ipsum(dolor: Dolor) -> Sit - where Dolor: Eq - { - // body - } -} -``` - -**Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`. - See also: [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style). ## `where_layout` From 33a2bc9d3f389a95cbb6e627f5b2b3457f91d839 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 9 Nov 2017 14:10:37 -0500 Subject: [PATCH 4/6] Configurations: document error_on_line_overflow_comments --- Configurations.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Configurations.md b/Configurations.md index 619900d18499..55bf9f6bb26d 100644 --- a/Configurations.md +++ b/Configurations.md @@ -484,6 +484,15 @@ Error if unable to get all lines within `max_width` See also [`max_width`](#max_width). +## `error_on_line_overflow_comments` + +Error if unable to get all comment lines within `comment_width`. + +- **Default value**: `true` +- **Possible values**: `true`, `false` + +See also [`comment_width`](#comment_width). + ## `fn_args_density` Argument density in functions From fcdd01989db58e0d4422a36f7313ae5781786cc1 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 9 Nov 2017 14:10:37 -0500 Subject: [PATCH 5/6] 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. From 523fc086c79e804a1b815056f23c69da687b27b4 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 9 Nov 2017 14:10:37 -0500 Subject: [PATCH 6/6] Configurations: document report_todo and report_fixme --- Configurations.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Configurations.md b/Configurations.md index f504b8e74688..68ff64cffb9b 100644 --- a/Configurations.md +++ b/Configurations.md @@ -1614,6 +1614,32 @@ extern crate sit; See also [`reorder_extern_crates`](#reorder_extern_crates). +## `report_todo` + +Report `TODO` items in comments. + +- **Default value**: `"Never"` +- **Possible values**: `"Always"`, `"Unnumbered"`, `"Never"` + +Warns about any comments containing `TODO` in them when set to `"Always"`. If +it contains a `#X` (with `X` being a number) in parentheses following the +`TODO`, `"Unnumbered"` will ignore it. + +See also [`report_fixme`](#report_fixme). + +## `report_fixme` + +Report `FIXME` items in comments. + +- **Default value**: `"Never"` +- **Possible values**: `"Always"`, `"Unnumbered"`, `"Never"` + +Warns about any comments containing `FIXME` in them when set to `"Always"`. If +it contains a `#X` (with `X` being a number) in parentheses following the +`FIXME`, `"Unnumbered"` will ignore it. + +See also [`report_todo`](#report_todo). + ## `single_line_if_else_max_width` Maximum line length for single line if-else expressions.