Commit graph

3333 commits

Author SHA1 Message Date
Nick Cameron
5194984812 Add a verbose-diff option
And don't print end of line characters by default in diffs

cc #2536
2018-04-20 14:02:44 +12:00
Nick Cameron
7a886e8fe5 Refactoring around write mode in main 2018-04-20 13:42:27 +12:00
Nick Cameron
a73f14aa95 Trivial refactoring in bin 2018-04-20 13:24:45 +12:00
David Barsky
f9532ba8d7 Implemented rough draft of check write mode. (#2539)
* Add rough draft of `check` mode. Not unit tested.

* Added assert-cli; simple test case for `--write-mode=check`

* Lightly documented `check` WriteMode

* wrote clearer phrasing for config::options::WriteMode::Check

* Implemented default for WriteMode where default is Overwrite

* Simplified exit code handling

* updated README.md as per @nrc' comment

* collapsed exit-code handling

* Removed write_mode from Summary, introduced partial option parsing earlier

* Handle write-mode parsing in a slightly better way.
2018-04-20 11:14:11 +12:00
Nick Cameron
fe29b2a972
Merge pull request #2632 from phansch/master
Link to official nightly documentation
2018-04-20 06:56:03 +12:00
Philipp Hansch
d93ae12c52
Link to official nightly documentation
Since https://github.com/rust-lang/rust-central-station/pull/40 has been
merged, we have a stable location for the nightly docs.
2018-04-19 08:22:13 +02:00
Nick Cameron
dd807e2465 Update rustc_ap_syntax 2018-04-18 08:19:57 +12: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
93da4d86cc
Merge pull request #2624 from sinkuu/dots
Add spaces between consecutive `..` `..=`
2018-04-17 20:16:48 +12:00
Shotaro Yamada
61d29eb70c Add spaces between consecutive .. ..= 2018-04-16 17:33:22 +09:00
csmoe
cef31b2841 update rustc-ap-syntax (#2622)
* update rustc-ap-syntax-100.0.0
2018-04-15 18:49:47 +09:00
Nick Cameron
1415a4dc23 Fix tests 2018-04-14 10:20:08 +12:00
Nick Cameron
01c1f99e39 Fallout from removing TupField 2018-04-14 10:15:39 +12:00
Nick Cameron
aa7fc4cdc5 Update rustc-ap-syntax 2018-04-14 09:47:13 +12:00
Nick Cameron
84598bd990 Update rustc_ap_syntax 2018-04-13 10:34:23 +12:00
Nick Cameron
febbb36937 nightly-0.4.2 2018-04-12 17:06:30 +12:00
Nick Cameron
45c66c75aa Fix tests 2018-04-12 17:05:34 +12:00
Nick Cameron
2cea3644fe
Merge pull request #2618 from topecongiro/issue-1174
Output xml header and footer only once
2018-04-12 16:56:00 +12:00
Seiichi Uchida
8b731db6ba Output xml header and footer only once 2018-04-12 13:45:12 +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
ba5b4fa516
Merge pull request #2617 from topecongiro/issue-2616
Preserve trailing comma on macro call when using mixed layout
2018-04-12 16:38:52 +12:00
Seiichi Uchida
0a2f01483b Cargo update 2018-04-12 12:48:27 +09:00
Seiichi Uchida
e58e97783e Preserve trailing comma on macro call when using mixed layout 2018-04-12 09:54:00 +09:00
Nick Cameron
1cab171bc3
Merge pull request #2605 from nrc/import-squelch
Coalesce some of the import options
2018-04-11 10:57:16 +12:00
Nick Cameron
305c640553 Review changes 2018-04-11 10:50:19 +12:00
Nick Cameron
1c17dbbf74 rebasing 2018-04-11 10:46:49 +12:00
Nick Cameron
aa4419019a Update tests 2018-04-11 10:46:49 +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
8820a59bd5 Resolve review comments 2018-04-10 12:36:57 +09:00
Seiichi Uchida
4a7e45ec28 Simplify UseTree::has_comment 2018-04-10 12:36:57 +09:00
Seiichi Uchida
1954513ace Merge imports with the same prefix into a single nested import 2018-04-10 12:36:57 +09:00
Seiichi Uchida
5dd203eabe Add merge_imports config option 2018-04-10 12:36:57 +09:00
Seiichi Uchida
805987b4b1 Add tests for merge_imports config option 2018-04-10 12:36:57 +09:00
Nick Cameron
518ece2272
Merge pull request #2612 from peterhuene/suppress-unstable-config-options
Suppress unstable config options by default.
2018-04-10 15:07:57 +12:00
Nick Cameron
2840229d6f
Merge pull request #2613 from dwijnand/patch-1
specify nightly required to install from source
2018-04-10 14:15:26 +12:00
Dale Wijnand
8331197b7b
specify nightly required to install from source
when using stable cargo install fails due to #![feature] usage:

    error[E0554]: #![feature] may not be used on the stable release channel
      --> /Users/dnw/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-67.0.0/lib.rs:24:1
       |
    24 | #![feature(rustc_private, box_syntax)]
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    error[E0554]: #![feature] may not be used on the stable release channel
      --> /Users/dnw/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-67.0.0/lib.rs:25:1
       |
    25 | #![feature(core_intrinsics)]
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    error[E0554]: #![feature] may not be used on the stable release channel
      --> /Users/dnw/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-67.0.0/lib.rs:26:1
       |
    26 | #![feature(i128_type)]
       | ^^^^^^^^^^^^^^^^^^^^^^
    
    error[E0554]: #![feature] may not be used on the stable release channel
      --> /Users/dnw/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-67.0.0/lib.rs:27:1
       |
    27 | #![feature(specialization)]
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    error: aborting due to 4 previous errors
    
    error: Could not compile `rustc-ap-serialize`.
    warning: build failed, waiting for other jobs to finish...
    error: failed to compile `rustfmt-nightly v0.4.1 (file:///d/rustfmt)`, intermediate artifacts can be found at `/d/rustfmt/target`
2018-04-09 22:54:17 +01:00
Peter Huene
8208f8aa01
Suppress unstable config options by default.
This commit suppresses the output of unstable config options by default.

Users can specify the `--unstable-features` option to show the config options
that are unstable.

Fixes #2611.
2018-04-09 12:45:56 -07:00
Nick Cameron
e784712f09 Try to fix a build regression before it happens 2018-04-09 21:07:49 +12: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
48e5bc1988 Reorder config options
cc #1974
2018-04-09 16:31:53 +12:00
Nick Cameron
7822d0c921 Fix test 2018-04-09 09:54:07 +12:00
Nick Cameron
45629dbdd6
Merge pull request #2609 from csmoe/update_rustc_syntax
update rustc_ap_syntax
2018-04-09 09:49:39 +12:00
csmoe
84d3659767 update rustc syntax 91.0.0 2018-04-08 22:22:11 +08:00
Seiichi Uchida
edcc7b69eb
Cargo update (#2602)
Update `rustc-ap-syntax` to 89.0.0 and fix up breaking changes.
2018-04-06 23:09:45 +09:00
Nick Cameron
b6645e345e
Merge pull request #2601 from topecongiro/fix-merge-mess
Fix up merge mess
2018-04-06 15:32:05 +12:00
Seiichi Uchida
04227a7d30 Fix up merge mess 2018-04-06 10:31:57 +09:00
Nick Cameron
0a480181e8
Merge pull request #2600 from i1skn/error_on_unformatted
Fix error_on_unformatted and skip_children override
2018-04-06 12:41:13 +12:00
Nick Cameron
4b2160e1b2
Merge pull request #2599 from topecongiro/issue-2596
Use multiple lines for imports list which exceeds max width
2018-04-06 11:12:53 +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
Ivan Sorokin
3fe2233fd3 Fix error_on_unformatted and skip_children override
Currently, error_on_unformatted and skip_children options
specified in the config file are discarded.
This happens because CLI options have a higher priority,
but we coerce an absence of a `bool` option to `false`.
In this scenario, an absence of a `bool` option is indistinguishable
from explicetely set as `false`. We should coerce it to `None` instead,
so it does not override the one in the config file.
2018-04-05 23:13:17 +02:00