Commit Graph

1112 Commits

Author SHA1 Message Date
Marcus Klaas de Vries
bdc2e4fd3f Merge pull request #603 from marcusklaas/multiline-math-armz
Wrap/unwrap match arms
2015-11-20 21:58:39 +01:00
Marcus Klaas
9fe3c08abc Add option to disable (un)wrapping of match arms 2015-11-20 21:50:25 +01:00
Marcus Klaas
7b0cceafee Force chains to adhere to restrictions 2015-11-20 21:09:34 +01:00
Marcus Klaas
6e1f77664d Unwrap match arms that are simple blocks 2015-11-20 21:05:18 +01:00
Marcus Klaas
8f3a29d1a7 Blockify multiline match arms 2015-11-20 21:05:10 +01:00
Nick Cameron
bc76558910 Merge pull request #631 from malbarbo/patch-1
Update README.md
2015-11-21 09:00:40 +13:00
Marco A L Barbosa
ddf9847d4a Update README.md 2015-11-20 16:58:57 -02:00
Nick Cameron
3533f72c45 Merge pull request #618 from zyphrus/master
Comments in structs use appropriate style
2015-11-20 18:14:26 +13:00
Nick Cameron
a15dc3d373 Merge pull request #628 from kyeah/single-line-fn
Single-line Functions
2015-11-20 18:13:03 +13:00
Kevin Yeh
2e9b6dfab4 Combine rewrite_single_line_fn and rewrite_fn 2015-11-19 20:49:24 -06:00
Kevin Yeh
15ec5b2912 Fix empty body format, add fn_empty_single_line option, refactor block tests 2015-11-19 20:45:02 -06:00
Nick Cameron
7eabbeb424 Merge pull request #629 from sfackler/usage
Use argv[0] for usage output
2015-11-20 15:09:42 +13:00
Steven Fackler
d7b331bea7 Use argv[0] for usage output
Usage messages traditionally use this as it contains the path that the
user provided to run the executable (e.g. `rustfmt` instead of
`/usr/local/bin/rustfmt`).
2015-11-19 17:56:37 -08:00
David Barnett
b3f41e82fc Use tactic instead of config
Add mixed test
Mixed is unreachable as there is no input combination that could get
to this value
2015-11-20 10:37:00 +13:00
Kevin Yeh
fbd1398c92 Implement Rewrite for ast::Stmt 2015-11-19 14:23:56 -06:00
Kevin Yeh
22837b0748 Combine block utilities 2015-11-19 14:23:56 -06:00
Kevin Yeh
4d7de5a16e Support single-line functions
By default, places functions with empty bodies on one line.
If the function has only one expression or statement that fits on one line, the 'fn_single_line' option can be used.
2015-11-19 14:23:56 -06:00
Nick Cameron
f09aa85798 Merge pull request #619 from SiegeLord/item_brace_style_1
Implement initial option for brace style for non-fn items.
2015-11-20 07:41:12 +13:00
Pavel Sountsov
1056006790 Properly follow the brace styles. 2015-11-18 22:34:14 -08:00
David Barnett
e44a7a2800 Test for single arm in struct 2015-11-18 23:30:23 +13:00
Jan Likar
f85ff8d0e5 Print version of the crate
Print version acquired from Cargo when building. If built using rustc
directly, print X.X.X
2015-11-18 00:56:46 +01:00
Pavel Sountsov
a96a69b708 Comments.
- Move the option
- Add some more tests (don't pass yet)
2015-11-16 23:18:07 -08:00
Nick Cameron
8d9c034a3f Merge pull request #620 from sidred10/atom-instructions
Atom instructions
2015-11-17 18:28:57 +13:00
sid
b12cdf6cc3 remove unnecessary full stop 2015-11-17 10:54:42 +05:30
sid
9bdcc0015f update atom instructions 2015-11-17 10:52:05 +05:30
Nick Cameron
c9120e9645 Merge pull request #591 from rust-lang-nursery/atom
Instructions for using Rustfmt from Atom.
2015-11-17 16:14:06 +13:00
Nick Cameron
a74b879428 Instructions for using Rustfmt from Atom.
Closes #581
2015-11-17 16:12:54 +13:00
David Barnett
30aec386f4 Comments in structs use appropriate style
Fixes #491
2015-11-17 11:57:49 +13:00
Nick Cameron
ce498e6b33 Merge pull request #589 from rust-lang-nursery/rustup
Slightly awkward rustup
2015-11-17 07:53:09 +13:00
Jan Likar
1eb38c461e Add -V as a shorthand for --version 2015-11-16 14:52:14 +01:00
Jan Likar
6e063a1430 Add --version switch
Add --version switch, which prints a short hash of the current
commit. Fix #612
2015-11-16 04:37:08 +01:00
Nick Cameron
56a765ef05 Rustup 2015-11-16 14:16:46 +13:00
Pavel Sountsov
8658774ad2 Implement initial option for brace style for non-fn items. 2015-11-15 11:55:18 -08:00
Nick Cameron
f88345c431 Merge pull request #607 from rhoot/native-newline
Adding a "Native" option to newline_style.
2015-11-16 08:25:22 +13:00
Nick Cameron
605bcdae0a Merge pull request #605 from sanxiyn/verbose
Add verbose mode
2015-11-16 07:33:39 +13:00
Johan Sköld
add37b9c49 Adds a "Native" option to newline_style.
By using it one will get \r\n line endings on Windows, and \n line endings
on other platforms.
2015-11-15 04:16:34 -08:00
Seo Sanghyeon
faff4bc9e8 Add verbose mode 2015-11-15 15:41:41 +09:00
Marcus Klaas de Vries
cdf56f75a1 Merge pull request #604 from eefriedman/path-cleanup
Pass in whether an ast::Path is in an expression context.
2015-11-15 00:02:12 +01:00
Eli Friedman
2fff041b43 Pass in whether an ast::Path is in an expression context.
This gets rid of a slightly nasty hack involving scanning the source
expression for a ":".
2015-11-14 13:54:57 -08:00
Marcus Klaas de Vries
de599015de Merge pull request #601 from thorbenk/chains_tabbed_indent
Chains tabbed indent
2015-11-14 22:00:11 +01:00
Thorben Kroeger
d4be6a43e9 new config 'chain_indent' 2015-11-14 21:50:40 +01:00
Marcus Klaas de Vries
7fe9272849 Merge pull request #602 from crumblingstatue/report_newline
Don't print an unnecessary newline after printing format report
2015-11-14 19:23:00 +01:00
Marcus Klaas de Vries
a8fe38ac3b Merge pull request #600 from thorbenk/config_help_cmd
fix documentation of config help
2015-11-14 19:22:27 +01:00
Mika Attila
5b06ed6817 Don't print an unnecessary newline after printing format report
The Display implementation for FormatReport already prints
a newline after every error.

However, if the format report does not contain errors, we
don't want to print an empty newline.

This behavior clutters up the console output with
empty lines when rustfmt is invoked multiple times
(from .e.g a script or cargo-fmt).

So instead of using println! to print the report, we just
use print!.
2015-11-14 19:01:28 +01:00
Thorben Kroeger
f8a1acc5e2 fix documentation of config help 2015-11-14 16:43:18 +01:00
Nick Cameron
2cf2230002 Merge pull request #596 from marcusklaas/where-indent
Fix brace indentation after where clause
2015-11-14 10:04:04 +13:00
Nick Cameron
fb6faed99b Merge pull request #597 from marcusklaas/method-generix
Fix span issue with generic method calls
2015-11-14 10:03:12 +13:00
Nick Cameron
f253bac206 Merge pull request #593 from JanLikar/Fix580
Enable rustfmt to format a list of files
2015-11-14 10:01:58 +13:00
Marcus Klaas
c93c771e71 Fix span issue with generic method calls 2015-11-13 14:53:34 +01:00
Marcus Klaas
d32245a13d Fix brace indentation after where clause 2015-11-13 14:31:20 +01:00