Nick Cameron
33b83ae7df
Formatting fallout
...
Also fixes a minor bug when we break a line after `if` and used to leave a trailing space
2017-03-07 09:50:41 +13:00
Nick Cameron
c7a33062e2
Add a heuristic for maximum number of elements in a single-line chain
...
And turn the source hints option to false by default. This should make formatting more deterministic.
2017-03-07 09:34:28 +13:00
Andy Librian
63114f3cac
added unit tests for Indent and Shape ( #1353 )
2017-03-06 07:50:04 +13:00
Nick Cameron
c9ac348759
Fix failing test
2017-03-02 15:03:32 +13:00
Nick Cameron
f2eac0513f
Fix trailing comma tests
2017-03-02 14:27:33 +13:00
Nick Cameron
248f2aba56
Merge branch 'master' of github.com:rust-lang-nursery/rustfmt
2017-03-02 14:27:02 +13:00
Marcus Ball
b8da53ad78
Fix wrap_match_arms resulting in a missing comma ( #1307 )
...
* Fix match arms missing comma with "wrap_match_arms = false"
* remove assert; use body_suffix for comma
* basic test case for issue 1127
2017-03-01 09:46:10 +13:00
Nick Cameron
eff665c5c4
Merge pull request #1334 from gypsydave5/fix_1255
...
Fix #1255 - incorrect removal of `default` on associated types
2017-02-27 11:57:58 +13:00
David Wickes
371ffa4710
Small reformat
2017-02-26 22:28:53 +00:00
David Wickes
094c8898e1
Fix for #1255
...
Default annotation incorrectly removed on associated types
Fixed by adding a specific function to perform formatting on `ImplItems`.
2017-02-26 22:28:21 +00:00
David Wickes
4f91f02ad1
Test for #1255
...
Default annotation incorrectly removed on associated type.
2017-02-26 22:27:46 +00:00
Nick Cameron
30ecc5d785
Merge pull request #1341 from daboross/patch-1
...
Update example in travis section of README
2017-02-27 09:41:50 +13:00
Nick Cameron
fd7b8c84d7
Merge pull request #1338 from ignatenkobrain/update-deps
...
Update deps
2017-02-27 09:40:35 +13:00
David Ross
a0560e3496
Update travis section of README
...
This fixes the example travis config to not ignore install errors for rustfmt, while still not trying to overwrite a previous install.
In addition, this rewrites the script: section to include multiple commands in a way that travis can more accurately indicate which failed and which succeeded.
2017-02-26 11:34:32 -08:00
Igor Gnatenko
106e011511
bump syntex_* to 0.58
...
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-02-26 15:41:32 +01:00
Igor Gnatenko
3323056893
bump regex to 0.2
...
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-02-26 15:09:31 +01:00
Igor Gnatenko
b9dfd29ce6
bump env_logger to 0.4
...
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-02-26 15:09:28 +01:00
Nick Cameron
fbb2370d66
Some tests
2017-02-24 10:43:53 +13:00
Nick Cameron
6a58d91239
Coalesce trailing comma options
2017-02-24 10:31:23 +13:00
Nick Cameron
7ad352239a
Fix width bug for long patterns in match arms
...
Fixes failing test
2017-02-24 07:52:46 +13:00
Nick Cameron
a84f42d13c
Merge pull request #1326 from durka/assoc-type-density
...
honor type_punctuation_density for assoc. types
2017-02-23 15:00:47 +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
Nick Cameron
d9d2423764
Tweak chain rules
2017-02-23 13:15:48 +13:00
Nick Cameron
9eb78a3333
Fallout
2017-02-23 13:15:48 +13:00
Nick Cameron
ba1202f6b3
test fallout
2017-02-23 13:15:48 +13:00
Nick Cameron
3bbdb0355e
remove some chain options
2017-02-23 13:15:48 +13:00
Nick Cameron
023b578c13
Remove indent from context and only use Shape
2017-02-23 13:14:59 +13:00
Alex Burka
181cde9afb
honor type_punctuation_density for assoc. types
2017-02-22 15:11:16 -05:00
Nick Cameron
b35906dbce
WIP
2017-02-21 16:35:05 +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
Sebastian Blunt
f6ccbd71c3
Add error_on_line_overflow option
...
Makes it configurable whether to error if unable to get all lines within
the max_width.
2017-02-19 19:56:37 +01:00
Casey Rodarmor
4f939ddf0c
Don't print config file by default ( #1313 )
...
Supress `Using rusftmt config file...` messages unless the --verbose
flag is given.
2017-02-13 12:50:10 +13:00
sinkuu
fad74c8ac9
Support field-init-shorthand ( #1308 )
2017-02-13 07:16:11 +13:00
Craig M. Brandenburg
f2c867d067
New disable_all_formatting
config option ( #1297 )
...
* New `disable_all_formatting` config option
* Resolve code review comments
2017-02-07 17:11:47 +13:00
Nick Cameron
5925a1a6d1
Merge pull request #1295 from tspiteri/let-if-else
...
Handle multiline condition in let if else (fixes #1239 )
2017-02-01 13:14:59 +13:00
Trevor Spiteri
6810c762df
Handle multiline condition in let if else ( fixes #1239 )
2017-01-31 23:35:57 +01:00
Nick Cameron
428339fdc3
Refactor indent and width into Shape struct
2017-01-31 08:35:23 +13:00
Nick Cameron
6054f28bd2
Some debugging stuff
2017-01-27 09:14:26 +13:00
Nick Cameron
e56ef44a3a
Do not format string lits by default
2017-01-27 08:11:59 +13:00
Nick Cameron
1f3100d7bb
Make string lit formatting fallible
...
This allows expressions containing string lits to wrap their content
Fixes #1282
2017-01-27 08:04:52 +13:00
Nick Cameron
309fb37f23
Allow some unused fields
2017-01-27 07:42:34 +13:00
Nick Cameron
6747cd721c
Start factoring out an abstract Item
2017-01-27 07:37:09 +13:00
Nick Cameron
3d3b6784d1
Nits
2017-01-26 15:44:54 +13:00
Nick Cameron
2261947f6e
Catch attributes before comments
...
Closes #1280
Closes #1284
2017-01-26 15:10:47 +13:00
Nick Cameron
b5d4421a83
Merge pull request #1286 from IvanUkhov/custom-build
...
Process build scripts
2017-01-26 08:15:47 +13:00
Ivan Ukhov
56e0c463d5
Process build scripts
2017-01-25 08:29:48 +01:00
Nick Cameron
72a67f4523
Merge pull request #1281 from shepmaster/patch-1
...
Add categories to Cargo.toml
2017-01-21 09:05:04 +13:00
Jake Goulding
d947646d6f
Add categories to Cargo.toml
2017-01-20 12:44:44 -05:00
Nick Cameron
907134c2d1
v0.7.1
2017-01-20 08:21:46 +13:00