]> git.lizzy.rs Git - rust.git/commitdiff
Merge pull request #2134 from mathstuf/configuration-fixes
authorNick Cameron <nrc@ncameron.org>
Thu, 9 Nov 2017 22:16:09 +0000 (11:16 +1300)
committerGitHub <noreply@github.com>
Thu, 9 Nov 2017 22:16:09 +0000 (11:16 +1300)
Configuration fixes

Configurations.md

index 4e7bdc3b457c811b4f8a675ad59d634a177e182c..68ff64cffb9b41ba7be82fd7a403c2a69773047d 100644 (file)
@@ -477,13 +477,22 @@ 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`
 
 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
@@ -1152,7 +1161,7 @@ use foo::{xxx, yyy, zzz};
 use foo::{aaa, bbb, ccc, ddd, eee, fff};
 ```
 
-#### `"HorizontalVertical"`
+#### `"HorizontalVertical"`:
 
 ```rust
 use foo::{xxx, yyy, zzz};
@@ -1165,7 +1174,7 @@ use foo::{aaa,
           fff};
 ```
 
-#### `"Vertical"`
+#### `"Vertical"`:
 
 ```rust
 use foo::{xxx,
@@ -1543,6 +1552,94 @@ 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).
+
+## `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.
@@ -2123,26 +2220,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: Dolor) -> Sit
-    where Dolor: Eq;
+        where Dolor: Eq;
 
     fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq,
+        where Dolor: Eq
     {
         // body
     }
 }
 ```
 
-#### `"Compressed"`:
+**Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`.
+
+#### `"CompressedIfEmpty"`:
 
 ```rust
 trait Lorem {
@@ -2150,47 +2248,46 @@ trait Lorem {
     where Dolor: Eq;
 
     fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where Dolor: Eq {
+    where
+        Dolor: Eq,
+    {
         // body
     }
 }
 ```
 
-#### `"Tall"`:
+#### `"Compressed"`:
 
 ```rust
 trait Lorem {
     fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq;
+    where Dolor: Eq;
 
     fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq,
-    {
+    where Dolor: Eq {
         // body
     }
 }
 ```
 
-**Note:** `where_density = "Tall"` currently produces the same output as `where_density = "Vertical"`.
-
-#### `"Vertical"`:
+#### `"Tall"`:
 
 ```rust
 trait Lorem {
     fn ipsum<Dolor>(dolor: Dolor) -> Sit
-        where Dolor: Eq;
+    where
+        Dolor: Eq;
 
     fn ipsum<Dolor>(dolor: Dolor) -> Sit
-        where Dolor: Eq
+    where
+        Dolor: Eq,
     {
         // body
     }
 }
 ```
 
-**Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`.
+**Note:** `where_density = "Tall"` currently produces the same output as `where_density = "Vertical"`.
 
 See also: [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style).