Commit Graph

2819 Commits

Author SHA1 Message Date
Chris Emerson
6f669091e0 Fix typo in comment. 2018-01-20 20:46:30 +00:00
Chris Emerson
7213b88ba1 Return a struct instead of a 4-tuple from get_modified_lines(). 2018-01-20 20:45:06 +00:00
Chris Emerson
fc377f3fb0 Add a new get_modified_lines() API to get only the new
changed lines from rustfmting.

Squashed commit of the following:

commit e90f9da64bbdb640b8c9ee61c3ad395617d8b4da
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Sat Jan 20 20:10:16 2018 +0000

    Fix tests after merging with master.

commit c3af0042769fe459b0c9c94a0934605ea4b40e40
Merge: 03868583 e0e3e222
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Sat Jan 20 17:45:05 2018 +0000

    Merge remote-tracking branch 'origin/master' into HEAD

commit 03868583f8555aae30bdfb5839a82afd3704f4cb
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Mon Nov 20 01:57:56 2017 +0000

    Fix some warnings.

commit 162b13463e44c782394d418db5ca5710931beb7a
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Mon Nov 20 01:48:02 2017 +0000

    Remove unneeded import.

commit 20cce3cbfd0f386d92b80bf4c7b83ab4d78a73e7
Merge: 81e98147 fa794f58
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Mon Nov 20 01:07:17 2017 +0000

    Merge branch 'master' into difflines_mode

commit 81e981472ceb3a0938d6f050edf8dcd5ebff8e33
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Mon Nov 20 01:02:50 2017 +0000

    Add a simple "modified lines" test.

commit 018390ced3523ca9fdd5384a6c1004cdb99174a9
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Thu Nov 2 23:06:21 2017 +0000

    Update test output.

commit 7909f4986ed21999aff7b3d075332e686ac464ff
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Thu Nov 2 23:03:22 2017 +0000

    Rerun rustfmt.

commit 6275f1a8da52db1df36c4b7432996cdbb94ca463
Merge: 7a66d286 175c0c6f
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Thu Nov 2 21:40:29 2017 +0000

    Merge remote-tracking branch 'origin/master' into difflines_mode

commit 7a66d2866432c430b046938bb37bf5efc03fa9da
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Thu Nov 2 21:36:40 2017 +0000

    WIP: Add a separate API to get changed lines.
    Currently calls format_input() and adjusts the output.

commit c8163a923c7d9ae42fd8078cd9b2b51c6f73e36e
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Fri Oct 27 22:53:33 2017 +0100

    Remove "modified" from the documentation again.

commit 94041fa115a6f428afe40e01d41bf2fe603f70bb
Merge: acaa3c7c 2adf7eec
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Fri Oct 27 22:47:05 2017 +0100

    Merge branch 'master' into difflines_mode

commit acaa3c7ce446297cd3fe5c9610763629a2d8537c
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Tue Oct 24 23:34:14 2017 +0100

    Update the Modified write mode to use `out` instead of just prinln!().

    This means we can test it more easily, so do so.

commit 9f1bbca1f3c12d933ea823918cc548e69b438b1e
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Tue Oct 24 23:11:55 2017 +0100

    Add "Modified" to the various lists of modes.

commit e12f023756cf3daf202dcaa02bd6492b0d2a0455
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Tue Oct 24 22:57:33 2017 +0100

    Rerun cargo fmt.

commit 0f8a43630fa1548e95dcb1c0933708f9c11ae135
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Tue Oct 24 22:46:26 2017 +0100

    Add `line_number_orig` to instances of `Mismatch` in tests.

commit d432a7061f74dbc159584f08470c64985a4b41d9
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Tue Oct 24 22:41:40 2017 +0100

    Add a `line_number_orig` field to `Mismatch` to track the pre-format line number.
    Use that for the write-mode=modified output.

commit bdb7d1d23f02f7b8f18e7073a65be88ff94cdbb3
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Tue Oct 24 22:35:50 2017 +0100

    First basic --write-mode=modified implementation.

commit ea1433dae0c32879a31182c11be08b1bf53fbf31
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Fri Oct 20 00:04:16 2017 +0100

    WIP on new "modified" mode.

commit 27ee9483cf937a11a0e115f54de0afcc3f9ceb44
Merge: e48dd81a 2a84352d
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Tue Oct 24 21:56:44 2017 +0100

    Merge remote-tracking branch 'jc/diff_zero_context' into difflines_mode
2018-01-20 20:23:25 +00:00
Seiichi Uchida
e0e3e22248 0.3.6 2018-01-18 18:56:46 +09:00
Nick Cameron
30ba763c77
Merge pull request #2371 from topecongiro/issue-2370
Do not panic when special macros have less args than expected
2018-01-18 15:19:41 +13:00
Seiichi Uchida
298f29a57d Do not panic when special macros have less args than expected 2018-01-18 00:50:16 +09: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
Seiichi Uchida
88cac558d9
Merge pull request #2366 from davidalber/restore-characters
Restoring accidentally-removed characters
2018-01-16 17:51:37 +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
Seiichi Uchida
fa782303a6 0.3.5 2018-01-15 21:34:41 +09:00
Seiichi Uchida
6af94c3188
Merge pull request #2363 from davidalber/reword-config-note
Rewording configuration note
2018-01-15 20:46:22 +09:00
David Alber
49f418b838 Rewording configuration note 2018-01-15 01:41:11 -08:00
Nick Cameron
74a957e80f
Merge pull request #2357 from topecongiro/issue-2342
Put attributes and struct fields on different line by default
2018-01-12 17:32:55 +13:00
Nick Cameron
a7d1d1da0e
Merge pull request #2355 from topecongiro/hide-parse-error-format-snippet
Hide parse error in format_snippet()
2018-01-12 17:31:43 +13:00
Nick Cameron
b356fc06f7
Merge pull request #2352 from topecongiro/issue-2337
Break after colon if static item does not fit in a single line
2018-01-12 17:31:12 +13:00
Nick Cameron
09e44b22f2
Merge pull request #2351 from topecongiro/issue-2256
Use correct BytePos when recovering comments on removed import
2018-01-12 17:30:27 +13:00
Nick Cameron
be0000380b
Merge pull request #2350 from topecongiro/issue-2324
Issue 2324
2018-01-12 17:27:45 +13:00
Seiichi Uchida
41b14b640a
Merge pull request #2353 from davidalber/merge-print-diff
Consolidating the logic for printing output
2018-01-12 08:26:42 +09:00
Seiichi Uchida
1abbd74a7f
Merge pull request #2358 from PSeitz/master
case insensitive FIXME and TODO
2018-01-12 08:26:14 +09:00
David Alber
9f5f9d2250 Consolidating the logic for printing output 2018-01-11 08:02:57 -08:00
Pascal Seitz
2e82ad8c36 case insensitive FIXME and TODO 2018-01-11 11:04:28 +01:00
Seiichi Uchida
fbbaab8051 Update changelog 2018-01-11 17:24:35 +09:00
Seiichi Uchida
2420d346c5 Put attributes and struct fields on different line 2018-01-11 16:57:12 +09:00
Seiichi Uchida
6e05ca87b0 Add a test for #2343 and update tests 2018-01-11 16:53:13 +09:00
Seiichi Uchida
279acda4c4 Remove same_line_attributes config option 2018-01-11 16:52:28 +09:00
Seiichi Uchida
cf4ab38f67 Hide parse error in format_snippet() 2018-01-11 15:19:23 +09:00
Nick Cameron
3e29fe3330 Use published versions of libsyntax and librustc_errors
Rather than the versions shipping with the compiler. These are still unstable,
so nightly is still required, but we can control when we update so breakage should
happen less often.
2018-01-11 18:21:35 +13:00
Nick Cameron
1ced6d1037 Minor refactoring in macros.rs 2018-01-11 17:40:05 +13:00
Seiichi Uchida
eaab51db2e Break after colon if static item does not fit in a single line 2018-01-10 23:23:42 +09:00
Seiichi Uchida
949708f617 Use correct BytePos when recovering comments on removed import 2018-01-10 21:30:41 +09:00
Seiichi Uchida
1e7ff38c2d Add a test for #2256 2018-01-10 21:30:13 +09:00
Seiichi Uchida
727f7b08f2 Fix error message printing wrong file names
The error messsages from `self_test` does not display correct file names
(it just prints `src/lib.rs` for every file). This commit fixes it.
2018-01-10 17:17:18 +09:00
Seiichi Uchida
cb0b366b38 Cargo fmt 2018-01-10 17:17:06 +09:00
Seiichi Uchida
590857db37 Reformat a nested function call with a single newline using larger budget 2018-01-10 17:15:02 +09:00
Seiichi Uchida
60256b7f3d Add a test for #2324 2018-01-10 17:14:50 +09:00
Seiichi Uchida
631bf68037
Merge pull request #2349 from davidalber/configurations-failure-message
Modifying failure messages to be consistent with mismatch message
2018-01-10 16:08:44 +09:00
Seiichi Uchida
2744190512
Merge pull request #2348 from davidalber/remove-unused
Removing unused name
2018-01-10 16:08:16 +09:00
David Alber
d981fb89c0 Removing unused name 2018-01-09 19:56:46 -08:00
David Alber
873abf01b5 Modifying failure messages to be consistent with mismatch message 2018-01-09 08:36:24 -08:00
Nick Cameron
d60a6958f8
Merge pull request #2292 from davidalber/configurations-checking
Configurations checking
2018-01-09 18:39:15 +13:00
David Alber
85ccb98469 Adding test to verify code block idempotency in Configurations.md 2018-01-04 00:01:18 -08:00
Nick Cameron
91a332483b
Merge pull request #2316 from topecongiro/issue-2315
Remove trailing comma from extern items snippet before comparing
2018-01-04 17:49:47 +13:00
Nick Cameron
fad9076ec7
Merge pull request #2336 from vishalsodani/master
Fix #2300
2018-01-04 17:31:02 +13:00
Vishal Sodani
3345b00952 Fix #2300 2018-01-04 09:50:45 +05:30
Nick Cameron
e343aa24b3
Merge pull request #2332 from topecongiro/impl-and-trait
Fix up formatting bugs in impl and trait
2018-01-04 16:51:56 +13:00
topecongiro
405360a3fd Refactoring: use methods from libsyntax attr module 2018-01-04 12:49:37 +09:00
topecongiro
75cb236711 Compare extern crate items with its name instead of span
When we use span, bugs easily sneak in.
2018-01-04 12:49:37 +09:00