Commit graph

39 commits

Author SHA1 Message Date
topecongiro
008aa88d6e Add tests for #2818 2018-06-30 19:20:47 +09:00
Nick Cameron
51f566062f Update uses of rustfmt_skip to rustfmt::skip 2018-05-14 16:25:10 +12:00
Nick Cameron
4f522794ae Tidy up and pass tests 2018-03-02 15:07:13 +13:00
topecongiro
4af2aa3a9e Create rustfmt_core crate 2018-02-07 22:48:05 +09:00
topecongiro
18ba02ea70 Add a test for #2208
Closes #2208.
2018-02-05 08:38:53 +09:00
topecongiro
1f5f9533d0 Add a test for where clause on unit struct 2017-11-13 11:06:09 +09:00
topecongiro
8685cdadda Add a test for #2144 2017-11-13 08:01:52 +09:00
topecongiro
bbfdb12c3e Add a test for #2125 2017-11-08 11:52:14 +09:00
topecongiro
af3d793e30 Add more tests 2017-11-03 23:38:32 +09:00
topecongiro
691bc3bbd7 Add a test for structs with visibility 2017-11-03 22:25:30 +09:00
Martin Lindhe
f930a16b8d fix some typos 2017-11-01 07:33:55 +01:00
Seiichi Uchida
c720a3a38e Remove colon from faulty span 2017-09-05 01:04:31 +09:00
topecongiro
d97ecd319d Update tests 2017-07-25 18:51:29 +09:00
topecongiro
680a3a1d19 Add tests to check alignment don't exceed max_width 2017-07-07 09:04:06 +09:00
topecongiro
a4cce31ea9 Update tests 2017-07-07 09:04:06 +09:00
topecongiro
2ed6feca83 Update tests
Now structs.rs has no overflowing max_width :)
2017-07-03 18:55:11 +09:00
topecongiro
b6c503ac32 Allow comments after attributes of struct fields 2017-05-27 09:36:25 +09:00
topecongiro
b48f4e03b3 Add tests for issues which can be closed on master 2017-05-04 14:32:13 +09:00
topecongiro
93dae1a34d Add test for empty tuple struct with comment 2017-05-02 10:21:39 +09:00
topecongiro
34b90d8716 Check existence of pre comment explicitly
This commit fixes #1428.
2017-03-31 21:57:29 +09:00
topecongiro
3a1ffa7db7 Split long fields in structs
This commit splits long fields in structs.
Closes #1412.
2017-03-30 13:37:34 +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
846d7ad387 make rustfmt-normalize_comments false by default 2017-01-16 14:50:27 +13:00
sinkuu
7e2fcc27e1 Fix #1258 (#1266)
* Fix #1258

* Add test
2017-01-09 16:11:12 +13:00
Nick Cameron
492b26cf04 Empty structs and struct lits (#920)
* Handle empty struct lits

Closes #835

* Don't crash on empty struct defs.

Not a great fix, but better than crashing.
2016-04-11 21:05:54 +02:00
Nick Cameron
585b071aa1 Merge pull request #678 from marcusklaas/length-one-tuplez
Fixed named arguments in bare function types
2015-12-07 09:01:38 +13:00
Marcus Klaas
97e4e7e5ba Fixed named arguments in bare function types 2015-12-06 01:11:26 +01:00
Marcus Klaas
0fb9611786 Don't include failed item rewrites in missed spans 2015-11-30 23:12:50 +01:00
Marcus Klaas
4b4dd170d8 Correct doc comment indentation for struct fields
Fix https://github.com/rust-lang-nursery/rustfmt/issues/572.
2015-11-22 22:55:57 +01:00
Marcus Klaas
d32245a13d Fix brace indentation after where clause 2015-11-13 14:31:20 +01:00
Marcus Klaas de Vries
e0e24c4e76 Merge pull request #573 from nrc/doom_panic
Format tuple structs better
2015-11-09 20:17:50 +01: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
Nick Cameron
bcda2824a2 Format tuple structs better
closes #546
2015-11-09 19:00:04 +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
Marcus Klaas
5db17ca703 Use the maximum available width in struct formatting
Previously, we'd use an approximation for the maximum width since the configuration wasn't available in `write_list`.
2015-09-25 16:56:22 +02:00
Nick Cameron
97e92b35cc Preserve some whitespace between struct fields etc. 2015-09-02 14:11:19 +12:00
Marcus Klaas
150c333e6c Fix bug in path formatting 2015-08-21 16:28:32 +02:00
Marcus Klaas
0ef5db9496 Format tuple-like structs 2015-06-23 16:54:42 +02:00