Commit Graph

32 Commits

Author SHA1 Message Date
Seiichi Uchida
70c69c6acd Update tests 2017-11-11 23:16:12 +09:00
topecongiro
49409c0096 Update tests 2017-11-02 21:38:20 +09:00
Seiichi Uchida
c0997260ba Update tests 2017-10-01 21:21:20 +09:00
topecongiro
ff30782725 Update tests 2017-09-15 12:20:58 +09:00
topecongiro
f8bdcd62e8 Do not allow single-lined closure with block body 2017-09-03 08:10:12 +09:00
topecongiro
dcb953b901 Add trailing comma when using Mixed indent style with newline 2017-07-13 20:32:46 +09:00
Seiichi Uchida
4d11faff4b Update tests 2017-06-18 02:16:27 +09:00
topecongiro
de10113c74 Update tests
Add more patterns and types
2017-06-15 16:55:31 +09:00
topecongiro
b8f11a4e3c Format source codes 2017-06-14 20:39:07 +09:00
Nick Cameron
18ccd0190e Rebasing 2017-06-13 14:49:47 +12:00
Nick Cameron
6f30d9e7c9 Reformat tests 2017-06-13 14:42:54 +12:00
topecongiro
62d200d9cf Update tests 2017-06-04 19:35:29 +09:00
Seiichi Uchida
189b6bd7bb Update tests 2017-05-25 22:55:33 +09:00
Nick Cameron
a7183766b9 Test fallout 2017-04-06 13:06:11 +12:00
Nick Cameron
b9ab3ef9da Test fallout 2017-03-07 11:28:25 +13:00
Nick Cameron
db10a0b9b2 Merge pull request #1325 from C4K3/master
Add error_on_line_overflow option
2017-02-23 14:46:24 +13:00
Nick Cameron
a7612cc773 more fallout 2017-02-23 13:15:48 +13: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
d948485371 Allow empty blocks on one line in more places
In particular if they contain only a single-line comment.

Fixes #493
2017-01-16 16:37:58 +13:00
Nick Cameron
846d7ad387 make rustfmt-normalize_comments false by default 2017-01-16 14:50:27 +13:00
Nick Cameron
d3eba76e4d update Serde, etc.
Lots of changes to how closures work
2016-11-21 11:02:18 +13:00
Marcus Klaas
98c0570a28 Format non-statement if-else expressions on a single line 2016-05-29 17:58:38 +02:00
Marcus Klaas
eae2921e14 Bootstrap it. Hard. 2016-05-12 21:50:43 +02:00
Nick Cameron
a9c3108c9c Change defaults and update tests and source
New defaults are `Tabbed` for `chain_indent` and `chain_base_indent`, and `5` for `closure_block_indent_threshold`.
2016-04-22 19:18:48 +12:00
Nick Cameron
9761cf71d8 Tests 2016-04-22 18:53:39 +12: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
Marcus Klaas
559f00ba99 Fix up indentation of function style paths
Fixes https://github.com/rust-lang-nursery/rustfmt/issues/105.
2015-11-22 14:48:30 +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
Marcus Klaas
ca023ba9b7 Format some patterns 2015-10-19 20:15:36 +02:00
Marcus Klaas
dba08bf898 Indent uncontinued chains to block level 2015-10-14 19:41:29 +02:00
Marcus Klaas
ccd404ac6f Try "overflowing" the final function argument when it's a closure
This means that we try formatting the last argument of a function call with block
indentation instead of visual indentation when it is a closure and its first line
fits on the same line as the first arguments.
2015-10-08 23:40:33 +02:00
Pavel Sountsov
05c8c28935 Add some tests for hard tab mode. 2015-09-19 10:36:46 -07:00