Markus Westerlind
ad7dc420cd
Avoid adding an extra newline after block comments
...
When block comments were rewritten to line comments they check if a new line needs to be added and adds one if needed. It only checked for '\n' however which would cause a newline to be added even if the comment was ended by "\r\n"
2015-11-20 23:31:05 +01: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
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
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
Nick Cameron
686ec52b50
Merge pull request #594 from cskksc/master
...
Add emacs integration to readme.
2015-11-13 18:56:59 +13:00
cskksc
0330d13a78
Merge branch 'master' of https://github.com/rust-lang-nursery/rustfmt
2015-11-13 08:55:48 +05:30
cskksc
da1b3c1da8
Add emacs integration to readme.
2015-11-13 08:54:04 +05:30
Jan Likar
4443c4b7cc
Correct some non-idiomatic code
2015-11-13 02:08:57 +01:00
Nick Cameron
52f887574b
Merge pull request #592 from johannhof/coveralls
...
Try fixing OSX builds
2015-11-13 13:32:25 +13:00
Jan Likar
cb64ab22ec
Enable rustfmt to format a list of files
...
Fix #580 by allowing rustfmt to accept a list of files. This also
enables usage of shell wildcard expansion, although notably this does
not work with cmd.exe on Windows. For example: 'rustfmt *.rs' will
format all rust files in the current working directory.
- Change usage text to show rustfmt will accept a list of files
- Change "Using rustfmt config file: {}" message to
"Using rustfmt config file {} for {}"
- Change Operation::Format(PathBuf, WriteMode) to
Operation::Format(Vec<PathBuf>, WriteMode)
- Loop through Vec<PathBuf>, load config and call 'run' for each path
2015-11-13 01:32:22 +01:00
Johann
ab2f47eb71
Try fixing OSX builds
...
... that I broke by introducing travis-cargo.
2015-11-12 23:47:24 +01:00
Nick Cameron
60698b3c79
Merge pull request #590 from johannhof/coveralls
...
Report test coverage with travis-cargo & coveralls
2015-11-13 10:58:51 +13:00
Johann
87110e7d71
Report test coverage with travis-cargo & coveralls
...
As this project grows, it might be beneficial to require pull requests
to keep a certain level of test coverage. Plus it's a fun statistic.
2015-11-12 22:57:25 +01:00