Nick Cameron
95d6b64829
Replace WriteMode with EmitMode and backup bool
2018-05-21 14:14:09 +12:00
Nick Cameron
2ee8b0e4c5
Remove remove_blank_lines_at_start_or_end_of_block
...
cc #1974
2018-05-18 16:56:55 +12:00
Nick Cameron
dd9c15ad01
Unstabilise unstable_features
...
cc #1974
2018-05-18 16:53:08 +12:00
Nick Cameron
a70f71610c
stabilise remove_nested_parens
and set default to true
2018-05-18 16:46:22 +12:00
Nick Cameron
d726492e65
Remove spaces_within_parens_and_brackets
...
cc #1974
2018-05-18 16:35:09 +12:00
Nick Cameron
51f566062f
Update uses of rustfmt_skip
to rustfmt::skip
2018-05-14 16:25:10 +12:00
topecongiro
84e5634a1b
Update tests
2018-05-06 15:14:47 +09:00
csmoe
5b121582e5
add config test
2018-05-06 09:23:45 +08:00
csmoe
7c246344f8
remove nested parens option
2018-05-05 23:13:49 +08:00
csmoe
f7415bcea2
update self format
2018-04-29 20:53:31 +08:00
Mateusz Mikuła
d46b231ccb
Fix example for reorder_imports ( #2628 )
...
Default value changed in #2605
2018-04-17 23:04:15 +09:00
Nick Cameron
55dd8f1df0
Merge pull request #2603 from topecongiro/merge-nested-imports
...
Merge imports
2018-04-12 16:40:06 +12:00
Nick Cameron
305c640553
Review changes
2018-04-11 10:50:19 +12:00
Nick Cameron
911395a451
Squash the various 'reorder imports' option into one
...
cc #2185
2018-04-11 10:46:49 +12:00
Seiichi Uchida
5dd203eabe
Add merge_imports config option
2018-04-10 12:36:57 +09:00
Nick Cameron
f14671131e
Make error_on_line_overflow
false by default
...
And improve docs, the error message, etc.
I think false is the better default since such errors should only occur due to a bug in Rustfmt and therefore most users should not be notified of it happening (although to be clear, it might be a 'bug' which only occurs with pathological input and therefore we won't fix it). The error has proven to be confusing and annoying in the past.
Closes #1080
2018-04-09 16:47:55 +12:00
Nick Cameron
a3fba04141
Merge pull request #2593 from topecongiro/issue-2455
...
Add reorder_impl_items config option
2018-04-06 11:12:11 +12:00
Seiichi Uchida
94f5a05a6a
Add reorder_impl_items config option
2018-04-05 12:49:16 +09:00
Remi Rampin
37ee9c20aa
Improve where_single_line help
2018-03-31 18:51:41 -04:00
Nick Cameron
8dd08ddd92
Merge pull request #2562 from topecongiro/issue-2196
...
Combine simple heuristics for function calls and array
2018-03-28 16:49:25 +02:00
Michael Noronha
faa9339e5d
/s/featuers/features
2018-03-26 22:40:39 -05:00
Seiichi Uchida
48424ea765
Update tests and cargo fmt
2018-03-26 07:38:39 +09:00
Nick Cameron
bf9f175336
reviewer comments and rebase fallout
2018-03-20 09:27:31 +13:00
Nick Cameron
50c95a074a
cargo fmt
2018-03-20 09:27:31 +13:00
topecongiro
3999d64f12
Simplify IgnoreList
2018-03-12 08:41:19 +09:00
Seiichi Uchida
84ad70c151
Add ignore config option
...
For example, with the following config file, rustfmt will ignore `src/types.rs`,
`src/foo/bar.rs` and every file under `examples/` directory.
```toml
[ignore]
files = [
"src/types.rs",
"src/foo/bar.rs",
]
directories = [
"examples",
]
```
2018-03-09 13:37:52 +09:00
David Lukes
53347bc226
Add license_template_path configuration snippet
2018-03-05 13:19:46 +01:00
topecongiro
34f6408ea2
Update Configurations.md
2018-02-23 21:55:16 +09:00
David Alber
7739cf8f46
Modifying reorder_extern_crates
example to show effect on groups
2018-02-19 22:32:44 -08:00
David Alber
00cab7e74c
Fixing the documentation for reorder_extern_crates_in_group
2018-02-19 22:32:44 -08:00
David Alber
73b13e0abe
Using shorter example for struct_lit_single_line
option
2018-02-18 23:17:36 -08:00
David Alber
f2bed291ba
Fixing command-line option name
2018-02-12 21:48:57 -08:00
David Alber
429dad72b6
Formatting snippets without configuration option marked as skip
2018-02-12 08:17:43 -08:00
David Alber
d4a518dc0a
Fixing control flow examples
2018-02-11 14:48:45 -08:00
Nick Cameron
b7f01769f9
Merge branch 'master' into init-shorthand
2018-02-01 15:20:01 +13:00
Seiichi Uchida
c9c346a89f
Add 'use_field_init_shorthand' config option
2018-01-29 22:15:20 +09:00
David Alber
476ec77fa3
Wrapping match_arm_blocks=false
snippet in function
2018-01-25 21:05:19 -08:00
David Alber
42efa7cc2f
Wrapping match_arm_blocks=true
snippet in function
2018-01-25 21:05:19 -08:00
David Alber
d27393528c
Fixing use_try_shorthand=true
snippet
2018-01-25 21:05:19 -08:00
David Alber
90c3ea716a
Fixing use_try_shorthand=false
snippet
2018-01-25 21:05:19 -08:00
David Alber
4315e3d968
Fixing type_punctuation_density=Compressed
snippet
2018-01-25 21:05:19 -08:00
David Alber
dab8f4991d
Fixing type_punctuation_density=Wide
snippet
2018-01-25 21:05:19 -08:00
David Alber
61630bc6f5
Wrapping trailing_comma=Never
snippet in function
2018-01-25 21:05:19 -08:00
David Alber
6c92808060
Wrapping trailing_comma=Always
snippet in function
2018-01-25 21:05:19 -08:00
David Alber
99ae6b8d1f
Wrapping trailing_comma=Vertical
snippet in function
2018-01-25 21:05:19 -08:00
David Alber
9d696a94e6
Fixing tab_spaces=2
snippet
2018-01-25 21:05:19 -08:00
David Alber
e5cdf0e9fd
Fixing tab_spaces=4
snippet
2018-01-25 21:05:19 -08:00
David Alber
fdd126a36e
Wrapping struct_lit_single_line=false
snippet in function
2018-01-25 21:05:19 -08:00
David Alber
33b5c3f9d5
Fixing spaces_within_parens_and_brackets=true
snippet
2018-01-25 21:05:19 -08:00
David Alber
9a9bb8564b
Fixing spaces_within_parens_and_brackets=false
snippet
2018-01-25 21:05:19 -08:00
David Alber
8d0497bf83
Fixing force_multiline_blocks=true
snippet
2018-01-25 21:02:18 -08:00
David Alber
f624f6b5a6
Fixing force_multiline_blocks=false
snippet
2018-01-25 21:02:18 -08:00
Seiichi Uchida
a19e1c0b83
Merge pull request #2369 from davidalber/fix-configuration-snippets
...
Fixing straightforward configuration snippets (Part 1)
2018-01-26 12:35:04 +09:00
David Alber
69f27673df
Extending spaces_around_ranges
to ranges in match arm patterns
2018-01-21 16:50:17 -08:00
David Alber
2afd1eada3
Wrapping match_block_trailing_comma=true
snippet in function
2018-01-16 08:12:32 -08:00
David Alber
44d2fcc2a0
Wrapping match_block_trailing_comma=false
snippet in function
2018-01-16 08:12:32 -08:00
David Alber
ee9bdeed7d
Fixing imports_layout="HorizontalVertical"
snippet
2018-01-16 08:12:32 -08:00
David Alber
e49314fccc
Fixing imports_layout="Mixed"
snippet
2018-01-16 08:12:32 -08:00
David Alber
c92a3b4066
Fixing imports_indent="Block"
snippet
2018-01-16 08:12:32 -08:00
David Alber
167ed92a24
Fixing imports_indent="Visual"
snippet
2018-01-16 08:12:32 -08:00
David Alber
df9cbb92bd
Fixing format_strings=true
snippet
2018-01-16 08:12:31 -08:00
David Alber
30f89c3063
Fixing format_strings=false
snippet
2018-01-16 08:12:31 -08:00
David Alber
ed90b2232f
Fixing where_single_line=true
snippet
2018-01-16 08:12:31 -08:00
David Alber
76947a68d3
Fixing where_single_line=false
snippet
2018-01-16 08:12:31 -08:00
David Alber
45deeee80f
Fixing brace_style="PreferSameLine"
structs and enums snippet
2018-01-16 08:12:31 -08:00
David Alber
034bd7a88e
Fixing brace_style="AlwaysNextLine"
structs and enums snippet
2018-01-16 08:12:31 -08:00
David Alber
4db479f637
Fixing brace_style="SameLineWhere"
structs and enums snippet
2018-01-16 08:12:31 -08:00
David Alber
514adeb156
Getting fn_args_density="Vertical"
snippet to pass
2018-01-16 08:12:31 -08:00
David Alber
7e7370756c
Wrapping control_brace_style="ClosingNextLine"
snippet in function
2018-01-16 08:12:31 -08:00
David Alber
ba7f3ab718
Wrapping control_brace_style="AlwaysNextLine"
snippet in function
2018-01-16 08:12:31 -08:00
David Alber
d49e22a2b8
Wrapping control_brace_style="AlwaysSameLine"
snippet in function
2018-01-16 08:12:31 -08:00
David Alber
368a44b564
Wrapping condense_wildcard_suffixes=true
snippet in function
2018-01-16 08:12:31 -08:00
David Alber
c08c706f55
Wrapping condense_wildcard_suffixes=false
snippet in function
2018-01-16 08:12:31 -08:00
David Alber
8b010c30fc
Getting binop_separator="Front"
snippet to pass
2018-01-16 08:12:31 -08:00
David Alber
b23204fc54
Correcting use_small_heuristics=true
snippet
2018-01-16 08:12:31 -08:00
David Alber
3a7eb68db9
Correcting indent_style="Block"
where predicate snippet
2018-01-16 08:12:31 -08:00
David Alber
e2ffee7cf8
Wrapping indent_style="Visual"
struct snippet in function
2018-01-16 08:12:31 -08:00
David Alber
c6a18143a8
Wrapping indent_style="Block"
struct snippet in function
2018-01-16 08:12:31 -08:00
David Alber
b56d88f751
Correcting indent_style="Visual"
generics snippet
2018-01-16 08:12:31 -08:00
David Alber
2455d60718
Correcting indent_style="Block"
generics snippet
2018-01-16 08:12:31 -08:00
David Alber
5180df4988
Wrapping indent_style="Visual"
function call snippet in function
2018-01-16 08:12:31 -08:00
David Alber
9fc00aa794
Wrapping indent_style="Block"
function call snippet in function
2018-01-16 08:12:31 -08:00
David Alber
48d7fb2db0
Wrapping indent_style="Visual"
array snippet in function
2018-01-16 08:12:31 -08:00
David Alber
5673c0fdbf
Wrapping indent_style="Block"
array snippet in function
2018-01-16 08:12:31 -08:00
Seiichi Uchida
c87bd9e92e
Merge pull request #2367 from Stinners/range_binopts
...
Fixing binop_separator="Back" for ranges (Issue #2364 )
2018-01-16 17:52:09 +09:00
David Alber
790611cd82
Restoring characters accidentally removed in bbe4b380
2018-01-15 20:57:28 -08:00
Chris Stinson
4c4e079613
Fixing binop_separator="Back" for ranges
...
Hardcoded Separator::Place=Front in call to rewrite_pair for range
caused binop_separator="Back" to be hendled incorrectly
Fixed rewrite_pair call and the example in Configuration.md showing
the faulty behaviour
2018-01-16 17:50:20 +13:00
Nick Cameron
13a0bb9158
Merge pull request #2361 from davidalber/fix-binop-separator-back-snippet
...
Getting `binop_separator="Back"` snippet in Configurations.md to pass
2018-01-16 13:01:02 +13:00
David Alber
bbe4b380c3
Getting binop_separator="Back"
to pass
2018-01-15 10:47:35 -08:00
David Alber
49f418b838
Rewording configuration note
2018-01-15 01:41:11 -08:00
Seiichi Uchida
279acda4c4
Remove same_line_attributes config option
2018-01-11 16:52:28 +09:00
David Alber
85ccb98469
Adding test to verify code block idempotency in Configurations.md
2018-01-04 00:01:18 -08:00
Lukas Kalbertodt
5de87bdbc0
Add options blank_lines_{lower|upper}_bound
to Configurations.md
2018-01-02 21:54:58 +01:00
Christopher Durham
dcd6ed7d5e
Remove reference to env var
...
The check was moved to compile time and was not intended to be user-facing
2017-12-16 21:05:24 -05:00
Christopher Durham
e18401ca01
Remove chain_indent
2017-12-16 21:03:51 -05:00
Christopher Durham
9ac1e6d978
Add configuration stability information
2017-12-16 21:03:51 -05:00
Clément Delafargue
3be1cb64a8
Fix format for spaces_around_ranges
example
2017-12-06 11:19:23 +01:00
Kevin Choubacha
60e8af59a0
Combine 3 repeated sections into a single section
2017-12-02 15:23:07 -08:00
Deepak Thukral
188acd9ffc
docs: fixes incorrect output
2017-11-30 14:48:29 +01:00
Deepak Thukral
73afe562f1
docs: Adds where_single_line in configuration documentation
2017-11-30 13:01:41 +01:00