Commit Graph

21 Commits

Author SHA1 Message Date
topecongiro
f35a420597 Update tests 2017-08-11 17:54:30 +09:00
topecongiro
2376582dfb Update tests 2017-08-11 17:54:20 +09:00
topecongiro
d97ecd319d Update tests 2017-07-25 18:51:29 +09:00
topecongiro
a4cce31ea9 Update tests 2017-07-07 09:04:06 +09:00
topecongiro
332cc97986 Use block indent style for struct tuple 2017-07-05 18:00:36 +09:00
Nick Cameron
6f30d9e7c9 Reformat tests 2017-06-13 14:42:54 +12:00
topecongiro
7be703a637 Implement Rewrite trait for syntax::ast::Attribute 2017-06-06 13:55:34 +09:00
topecongiro
d7de5b7656 Allow comments after attributes on enum fields 2017-06-04 23:27:21 +09:00
Sebastian Blunt
235f33b230
Make tests fail if rustfmt encounters an error
Previously tests would not fail if they encountered an error such as
LineOverflow or TrailingWhitespace. Making the tests error out will fix
this mismatch between running rustfmt for real and running the tests.

This also modifies all tests that previously contained errors so that
they no longer contain errors (in almost all of the tests this is
accomplished by setting error_on_line_overflow = false).
2017-02-19 19:57:02 +01:00
Nick Cameron
6ecf5b8e84 If a string goes over-width, give up formatting it
Logic here is that the original might be better and at best we'll only make it a different kind of bad.

Fixes #1237
2017-01-06 16:35:28 +13:00
Nick Cameron
775de8a62b Optionally put short struct variants on one line (#997)
Closes #418
2016-05-18 22:38:49 +02:00
Nick Cameron
7ac354fd09 Don't be so aggressie about line-breaking strings (#911)
We will no longer break in the middle of words, only at whitespace or punctuation.

This means we sometimes over-run, but that seems better than some of the bad splits we see.

Closes #369
2016-04-11 20:45:47 +02:00
Nick Cameron
b7d61254a7 Option to disable line breaking in comments
Set to false by default for now, since we are having a lot of problems with comments. We should set to true once we have a better algorithm.
2015-11-10 08:03:01 +13:00
Marcus Klaas
11756d2ef8 Refactor enum formatting 2015-10-19 21:28:05 +02:00
mwiczer
5162282b60 Support pre- and post-comments for enums
Use lists to format enum variants rather than special formatting.
Add tests for enums mostly around block comments.
2015-10-08 17:22:57 -04:00
Nick Cameron
9139a8040c Merge pull request #379 from marcusklaas/enum-quik-fix
Fix variant name duplication on rewrite failure
2015-09-28 07:51:09 +13:00
Marcus Klaas
a673fef844 Fix variant name duplication on rewrite failure 2015-09-27 17:23:37 +02:00
Nick Cameron
ba51535a74 Fixup tests 2015-09-27 19:39:58 +13:00
Gaëtan Cassiers
83290f15ad Add comma after struct-like enum variant
This is mandatory.
2015-07-03 10:30:42 +02:00
Marcus Klaas
0ef5db9496 Format tuple-like structs 2015-06-23 16:54:42 +02:00
Marcus Klaas
34b2721010 Fixup tests 2015-06-08 18:22:55 +02:00