Commit Graph

2929 Commits

Author SHA1 Message Date
Seiichi Uchida
75874bc257 Update CHANGELOG
1. Update CHANGELOG from 0.2.17 to 0.3.1.
2. Add Unreleased section to ease the management of CHANGELOG.
2017-12-12 15:02:29 +09:00
Seiichi Uchida
7229b26f14 Do not print to stderr when parsing the toml file succeeded 2017-12-12 14:10:31 +09:00
Seiichi Uchida
efb68ee21a Refactor write_snippet_inner() 2017-12-12 13:48:24 +09:00
Seiichi Uchida
516f15aba1 Cargo clippy 2017-12-12 13:48:12 +09:00
Nick Cameron
30abfd65a2
Merge pull request #2274 from topecongiro/better-error-msg
Attempt to improve error meassage from rustfmt
2017-12-12 16:55:55 +13:00
topecongiro
17154c30cb Warn when there are unknown config options 2017-12-12 00:54:55 +09:00
topecongiro
32804c1f09 Do not print usage when rustfmt failed 2017-12-12 00:54:37 +09:00
Seiichi Uchida
6ce082e3f1 0.3.1 2017-12-11 22:09:48 +09:00
Nick Cameron
fc52a4d33f
Merge pull request #2173 from topecongiro/assignment-with-100-chars
Assignment whose lhs has 100 chars
2017-12-11 17:04:41 +13:00
Nick Cameron
644b60ad85
Merge pull request #2257 from topecongiro/error-on-line-overflow-strings
Add error_on_line_overflow_strings config option
2017-12-11 16:41:15 +13:00
Nick Cameron
3c08da3433
Merge pull request #2270 from topecongiro/issue-2260
Trim a trailing whitespace on empty line inside code block comment
2017-12-11 16:40:12 +13:00
Seiichi Uchida
3dd31e25bf Use enumerate() 2017-12-11 11:50:11 +09:00
Seiichi Uchida
e45c0c4815 Rename error_on_unformatted_comments_or_strings to error_on_unformatted 2017-12-11 11:48:17 +09:00
Seiichi Uchida
d3ee7f3f06 Set error_on_unformatted_comments_or_strings to true when --error-on-unformatted
option is passed
2017-12-11 11:48:17 +09:00
Seiichi Uchida
93a75de18e Print command line options in alphabetical order 2017-12-11 11:48:17 +09:00
Seiichi Uchida
1e982c66a0 Fix a typo 2017-12-11 11:48:17 +09:00
Seiichi Uchida
cbd3608c30 Organize command line options and start with upper case 2017-12-11 11:48:17 +09:00
Seiichi Uchida
d17168f4ba Add error-on-unformatted command line option 2017-12-11 11:48:17 +09:00
Seiichi Uchida
aea19d5e33 Combine error_on_line_overflow_comments/strings
1. Rename to error_on_unformatted_comments_or_strings
2. Set the option to false by default.
2017-12-11 11:48:17 +09:00
Seiichi Uchida
4d9226ffee Fix a typo 2017-12-11 11:48:17 +09:00
Seiichi Uchida
6c3de706ae Make RichChar public 2017-12-11 11:48:17 +09:00
Seiichi Uchida
ef6ebaa215 Add a config option to suppress error message on string literal 2017-12-11 11:48:17 +09:00
Seiichi Uchida
d1e5d7866b Make CharClasses and FullCodeCharKind public 2017-12-11 11:47:19 +09:00
Seiichi Uchida
6d78bd5fdc Add a test for error_on_line_overflow_strings 2017-12-11 11:47:19 +09:00
Seiichi Uchida
a16a5b4c2e Add a test fot #2260 2017-12-11 11:40:59 +09:00
Nick Cameron
aec8cfa749
Merge pull request #2261 from topecongiro/replace-string-buffer
Replace `StringBuffer` with `String`
2017-12-11 15:39:55 +13:00
Seiichi Uchida
5faf31bb32 Trim a trailing whitespace on empty line inside code block comment 2017-12-11 11:37:13 +09:00
Seiichi Uchida
db29f9e0f7 Fix indent issue when recovering comments
Closes #1989
2017-12-11 09:20:02 +09:00
Seiichi Uchida
414a995926 Replace StringBuffer with String 2017-12-11 09:19:00 +09:00
Nick Cameron
3f7a27b547 0.3.0 2017-12-11 09:35:30 +13:00
Nick Cameron
0c9b2b402e
Merge pull request #2267 from topecongiro/issue-2264
Remove block() and block_only() wherever possible
2017-12-11 09:02:16 +13:00
Nick Cameron
08022ec1a3
Merge pull request #2265 from topecongiro/issue-2262
Fix bugs related to closures
2017-12-11 09:00:56 +13:00
Nick Cameron
5da2d7be32
Merge pull request #2258 from topecongiro/issue-819
Format macro in pattern position
2017-12-11 08:54:02 +13:00
Nick Cameron
d2b006d6b4
Merge pull request #2255 from topecongiro/nested-imports
Nested imports
2017-12-11 08:53:23 +13:00
Nick Cameron
68b43b2240
Merge pull request #2250 from topecongiro/rustfmt-skip-no-warning-on-items
Do not report errors on skipped items or statements
2017-12-11 08:47:26 +13:00
Nick Cameron
db5d6dd702
Merge pull request #2249 from CAD97/patch-3
unstable_features without CFG_RELEASE_CHANNEL
2017-12-11 08:45:02 +13:00
Seiichi Uchida
b29a3afb96 Fix indentation in multi lined pattern 2017-12-10 23:54:34 +09:00
Seiichi Uchida
a7060f9fdf Remove excessive block() and block_only()
Since we now use the same indent style for every expressions, these safe guards
can be removed.
2017-12-10 23:39:09 +09:00
Seiichi Uchida
b749aa0699 Add a test fot #2264 2017-12-10 23:38:30 +09:00
Seiichi Uchida
e3d2f2c2b1 Cargo fmt 2017-12-10 21:54:26 +09:00
Seiichi Uchida
90383d7426 Do not set inside_macro flag when converting try!() to '?'
This will keep rustfmt idempotent when using 'use_try_shorthand' config option.
2017-12-10 21:53:01 +09:00
Seiichi Uchida
42726906f7 Allow struct to be multi-lined in closure's body without block 2017-12-10 21:52:23 +09:00
Seiichi Uchida
bd6bef8cfa Move macro check to is_block_closure_forced() 2017-12-10 21:49:59 +09:00
Seiichi Uchida
812fc4ca56 Remove and_one_line() 2017-12-10 21:30:12 +09:00
Seiichi Uchida
5871967312 Verify whether adding block is safe in rewrite_closure_with_block()
Also ensure that the expression is nested to avoid false-positive.
2017-12-10 21:27:28 +09:00
Seiichi Uchida
4110c7b8c5 Add a test for #2262 2017-12-10 21:19:51 +09:00
Christopher Durham
7e2c3cb857 unstable_features without CFG_RELEASE_CHANNEL
Per discussion in #2228

https://github.com/rust-lang-nursery/rustfmt/pull/2228#issuecomment-348893294
https://github.com/rust-lang-nursery/rustfmt/pull/2228#issuecomment-349799548

Inline comment should explain the reasoning.
2017-12-10 01:01:36 -05:00
Seiichi Uchida
5624175574 Format macro in pattern position 2017-12-10 00:22:00 +09:00
Seiichi Uchida
0909ecbac7 Add tests for macro in pattern position 2017-12-10 00:21:49 +09:00
Seiichi Uchida
234c7da871 Handle nested imports 2017-12-09 16:45:25 +09:00