moxian
65ae0b9a09
Change enum align semantics to care about absolute length, rather than difference.
...
If we're only aligning enum discriminants that are "not too far apart
(length-wise)", then this works really well for enums with
consistently-long or consistently-short idents, but not for the mixed
ones.
However, consistently-long idents is somewhate of an uncommon case and
overlong idents may be allowed to be formatted suboptimally if that
makes mixed-length idents work better (and it does in this case).
2018-09-26 18:47:17 +00:00
moxian
cc22869fb4
Add option to vertically align enum discriminants.
2018-09-26 14:35:38 +00:00
Nick Cameron
1739041f03
Merge pull request #3002 from lqd/normalize-doc-attributes
...
normalize_doc_attributes option: convert doc attributes to comments
2018-09-19 11:05:27 +12:00
Ivan Molodetskikh
838df8dfb6
Use correct heuristic for match block flattening
2018-09-11 08:54:43 +03:00
lqd
4b7130dfa1
normalize_doc_attributes option: convert doc attributes to comments
...
Convert `#![doc]` and `#[doc]` attributes to `//!` and `///` doc comments.
2018-09-07 21:58:35 +02:00
Ryan Leckey
eec74360dc
Accept 2015 and 2018 instead of Edition2015 and Edition2018 for edition option
2018-08-31 00:04:23 -07:00
Aaron Loucks
e7932fa9c2
Updating newline_style documentation
2018-07-29 17:02:32 -04:00
Aaron Loucks
6ff2a5e0f3
Auto-detect newline style by default
2018-07-29 10:12:31 -04:00
Nick Cameron
90c5792565
Set rustfmt-format_macro_matchers to false by default
...
cc #2543
2018-07-18 12:09:50 +12:00
Nick Cameron
79c5ee8b42
Add config options for formatting macro matchers and bodies
...
Closes #2753
2018-07-18 12:03:59 +12:00
Michael Bebenita
c2ae39e77a
Add max_width option for all heuristics.
...
This is useful when working with very small max_widths like 79 chars.
2018-07-17 13:17:36 -04:00
Nick Cameron
d911b640d1
Merge pull request #2823 from fwalch/default-newline-style
...
Change default newline style to "Native"
2018-07-17 11:18:10 +12:00
Nick Cameron
ca57ff5b76
Fix Configurations.md
...
Correct default for `imports_indent`
Closes #2839
2018-07-17 10:45:30 +12:00
Seiichi Uchida
ae2c6a6692
Add a configuration guide for edition
2018-07-09 23:20:38 +09:00
Hannes Karppila
3562e643cf
Add missing equals sign to example configuration
2018-07-07 00:38:32 +03:00
Florian Walch
9d8f3812cc
Change default newline style to "Native"
...
Fixes #2626 .
2018-07-02 23:16:17 +02:00
Bernardo Meurer
3681199020
Fixed typo Yess -> Yes
2018-06-27 18:27:20 -07:00
YOSHIOKA Takuma
9212ae7d02
Remove wrong "(default)"
...
`blank_lines_upper_bound` has default value `1`, not `2`.
2018-06-21 11:42:09 +09:00
Nick Cameron
261238ea51
Change use_small_heuristics
to an enum and stabilise
...
Since it is now an enum, we can be future compatible since we can add variants
for different heuristics.
Closes #1974
2018-06-19 13:28:27 +12:00
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