Commit graph

3305 commits

Author SHA1 Message Date
Nick Cameron
418a612220
Merge pull request #2440 from topecongiro/issue-2439
Disable formatting macro-def if args do not fit on one line
2018-02-14 12:10:08 +13:00
Nick Cameron
9cbda9062f
Merge pull request #2435 from davidalber/fix-option-typo
Fixing command-line option name
2018-02-14 12:03:21 +13:00
Nick Cameron
ed2ecb647c
Merge pull request #2187 from brotzeit/master
don't print verbose output when formatting with stdin
2018-02-14 11:48:09 +13:00
topecongiro
b49b30746d Disable formatting macro-def if args do not fit on one line 2018-02-14 04:00:26 +09:00
Pascal Seitz
5d24dfbdfb scale WidthHeuristics by max_width
scale WidthHeuristics by max_width
2018-02-13 19:43:56 +01:00
Seiichi Uchida
fe30dab017 Preserve trailing two whitespace in comments
Closes #2434.
2018-02-13 19:39:37 +09:00
David Alber
f2bed291ba Fixing command-line option name 2018-02-12 21:48:57 -08:00
Chris Emerson
2a3caa7f57 Update comment to say that Modified is for internal use only. 2018-02-12 23:09:07 +00:00
Chris Emerson
807f29206a Update after review comments. 2018-02-12 23:07:46 +00:00
Chris Emerson
e02f268577 Move the modified test files to the new location. 2018-02-12 22:58:50 +00:00
Chris Emerson
c2fda14e0a Merge remote-tracking branch 'origin/master' into difflines_mode 2018-02-12 22:43:37 +00:00
Nick Cameron
67d36c7019
Merge pull request #2409 from davidalber/configuration-check-opt-out
Skipping formatting of some configuration snippets
2018-02-13 10:11:04 +13:00
David Alber
429dad72b6 Formatting snippets without configuration option marked as skip 2018-02-12 08:17:43 -08:00
brotzeit
32953d04de don't print verbose output when formatting with stdin 2018-02-12 12:58:38 +01:00
Seiichi Uchida
63ebe1b13e
Merge pull request #2432 from davidalber/remove-unused-import
Removing unused import
2018-02-12 18:37:37 +09:00
Seiichi Uchida
a6982b1bfd
Merge pull request #2433 from davidalber/unhork-snippet-tests
Fixing path to Configurations.md
2018-02-12 18:36:07 +09:00
David Alber
b8f0adb40d Fixing path to Configurations.md
Issue #2419 changed the directory in which
`configuration_snippet_tests` runs, which broke the test. Since the
test is currently annotated with `#[ignore]`, the break wasn't
caught before merge.
2018-02-11 21:53:19 -08:00
David Alber
6b4bc3ac14 Removing unused import 2018-02-11 21:15:06 -08:00
Nick Cameron
4af4927318
Merge pull request #2431 from davidalber/fix-indent-style-control-flow-snippet
Fixing `indent_style` control flow examples
2018-02-12 12:31:47 +13:00
Nick Cameron
8f8ee9e660
Merge pull request #2419 from topecongiro/core
Separate rustfmt into multiple crates
2018-02-12 12:15:49 +13:00
David Alber
d4a518dc0a Fixing control flow examples 2018-02-11 14:48:45 -08:00
Seiichi Uchida
5297e7c6dc Fix appveyor 2018-02-07 23:57:37 +09:00
Seiichi Uchida
b2a3986160 Pub use Config and Summary 2018-02-07 23:15:00 +09:00
topecongiro
5bd456dc3e Cargo update 2018-02-07 22:51:14 +09:00
topecongiro
9c9b31c13b Create git-rustfmt crate 2018-02-07 22:49:56 +09:00
topecongiro
d28d7fee89 Create rustfmt-format-diff crate 2018-02-07 22:49:43 +09:00
topecongiro
d18cd1d11c Create rustfmt-bin crate 2018-02-07 22:49:26 +09:00
topecongiro
3920282deb Create cargo-fmt crate 2018-02-07 22:49:10 +09:00
topecongiro
66b25f1b4a Create rustfmt_config crate 2018-02-07 22:48:52 +09:00
topecongiro
4af2aa3a9e Create rustfmt_core crate 2018-02-07 22:48:05 +09:00
Nick Cameron
c9e250a1ab
Merge pull request #2417 from topecongiro/issue-2415
Avoid orphan in chain with punctuation
2018-02-06 21:23:14 +13:00
Nick Cameron
fe06b96f48
Merge pull request #2416 from topecongiro/eshell
Explicitly disable colored output when it is not supported
2018-02-06 21:22:18 +13:00
topecongiro
5e0c6f9716 Avoid orphan in chain with punctuation 2018-02-06 09:36:29 +09:00
topecongiro
7f949a5018 Explicitly disable colored output when it is not supported 2018-02-06 09:29:00 +09:00
Seiichi Uchida
d85e1db178
Merge pull request #2393 from RReverser/macro_rules
Format stable macro_rules
2018-02-05 09:56:26 +09:00
topecongiro
18ba02ea70 Add a test for #2208
Closes #2208.
2018-02-05 08:38:53 +09:00
Nick Cameron
c4314df1ab
Merge pull request #2412 from topecongiro/issue-2399
Do not reorder items with '#[macro_use]'
2018-02-05 11:28:58 +13:00
Nick Cameron
c45c20378f
Merge pull request #2413 from topecongiro/issue-2401
Use correct offset when unindenting code block
2018-02-05 08:44:21 +13:00
Ingvar Stepanyan
8691c64e99 cargo run cargo-fmt
Reformat codebase with current version to pass self_tests (formats macros without repetitions).
2018-02-04 12:09:03 +00:00
Ingvar Stepanyan
d8c154f052 Extract branch rewrite function 2018-02-04 11:55:08 +00:00
Ingvar Stepanyan
571af9d4b1 Format 2018-02-04 11:54:03 +00:00
Ingvar Stepanyan
bc9185451d Move ; between macro branches to a separator 2018-02-04 11:54:03 +00:00
Ingvar Stepanyan
6377c52233 Fix comment handling in macros 2018-02-04 11:54:03 +00:00
Ingvar Stepanyan
70e7716262 Comments WIP 2018-02-04 11:54:03 +00:00
Ingvar Stepanyan
41c393c751 Keep delimiter as part of macro args list 2018-02-04 11:53:10 +00:00
Ingvar Stepanyan
fef3e03d3e Add repetition example 2018-02-04 11:53:10 +00:00
Ingvar Stepanyan
9423cdba82 Omit newline for empty macro branches 2018-02-04 11:53:10 +00:00
Ingvar Stepanyan
5bd036fcac Optimise common => {{ macro pattern 2018-02-04 11:53:10 +00:00
Ingvar Stepanyan
9fca9073d9 Revert comments 2018-02-04 11:53:10 +00:00
Ingvar Stepanyan
1b9fd01343 Support compact macros 2.0 representation 2018-02-04 11:53:10 +00:00