]>
git.lizzy.rs Git - rust.git/log
Vincent Esche [Sun, 30 Apr 2017 21:49:39 +0000 (23:49 +0200)]
Add source/target tests for each config option
Vincent Esche [Mon, 1 May 2017 13:50:08 +0000 (15:50 +0200)]
Improve gitignore, adding ‘.DS_Store’
Seiichi Uchida [Mon, 1 May 2017 09:52:43 +0000 (18:52 +0900)]
Use block indent when visual indent exceeds max_width
topecongiro [Wed, 19 Apr 2017 14:34:45 +0000 (23:34 +0900)]
Add tests for visual indent struct tuple
topecongiro [Wed, 19 Apr 2017 14:33:03 +0000 (23:33 +0900)]
Remove TODO from 'format_tuple_struct'
topecongiro [Wed, 19 Apr 2017 13:48:45 +0000 (22:48 +0900)]
Remove TODO from 'rewrite_generics'
topecongiro [Wed, 19 Apr 2017 09:52:56 +0000 (18:52 +0900)]
Refactor Shape
topecongiro [Fri, 14 Apr 2017 10:27:05 +0000 (19:27 +0900)]
Remove duplicates
topecongiro [Wed, 19 Apr 2017 01:14:27 +0000 (10:14 +0900)]
Use 'first_line_width'
Nick Cameron [Mon, 1 May 2017 04:38:43 +0000 (16:38 +1200)]
Merge pull request #1473 from topecongiro/bug/no-such-file-or-directory
Prevent panicking against directories or non-existent files
Nick Cameron [Mon, 1 May 2017 04:05:38 +0000 (16:05 +1200)]
Remove where_indent option
Nick Cameron [Mon, 1 May 2017 03:48:53 +0000 (15:48 +1200)]
Merge pull request #1469 from topecongiro/bug/chains
Remove a bug when calculating the length of the chain
Nick Cameron [Mon, 1 May 2017 03:15:30 +0000 (15:15 +1200)]
Merge pull request #1459 from shioju/master
Show exit codes' meanings with the rustfmt help message
Nick Cameron [Mon, 1 May 2017 03:13:19 +0000 (15:13 +1200)]
Merge pull request #1457 from diaevd/master
format_lines: fix line_len for config.max_width
Nick Cameron [Mon, 1 May 2017 01:15:28 +0000 (13:15 +1200)]
Merge pull request #1461 from DarkEld3r/1447-line-length-in-chars
Fix line length calculation (should be in chars, not bytes)
Nick Cameron [Mon, 1 May 2017 00:31:51 +0000 (12:31 +1200)]
Merge pull request #1455 from topecongiro/unary-op
Add heuristic choosing block or visual indent for unary op based on span
Seiichi Uchida [Wed, 26 Apr 2017 08:29:56 +0000 (17:29 +0900)]
Prevent panicking against directories or non-existent files
topecongiro [Mon, 24 Apr 2017 07:50:11 +0000 (16:50 +0900)]
Format source codes
topecongiro [Mon, 24 Apr 2017 07:48:05 +0000 (16:48 +0900)]
Remove '+ 1' when counting the length of chains
Stanislav Tkach [Wed, 19 Apr 2017 14:49:03 +0000 (17:49 +0300)]
Fix line length calculation (should be in chars, not bytes)
Sheng Hau [Tue, 18 Apr 2017 16:23:57 +0000 (00:23 +0800)]
Show exit codes' meanings with the rustfmt help message
Evgeny Duzhakov [Tue, 18 Apr 2017 11:31:53 +0000 (14:31 +0300)]
format_lines: fix line_len for config.max_width
topecongiro [Mon, 17 Apr 2017 13:57:07 +0000 (22:57 +0900)]
Prohibit long return val from 'rewrite_closure_block'
topecongiro [Sat, 15 Apr 2017 09:42:45 +0000 (18:42 +0900)]
Format source codes
topecongiro [Sat, 15 Apr 2017 09:40:39 +0000 (18:40 +0900)]
Add heuristic choosing block or visual indent for unary op based on span
topecongiro [Sat, 15 Apr 2017 07:23:38 +0000 (16:23 +0900)]
Check the length of the first line of the last method in the chain
topecongiro [Sat, 15 Apr 2017 07:22:54 +0000 (16:22 +0900)]
Format source codes
topecongiro [Sat, 15 Apr 2017 07:22:26 +0000 (16:22 +0900)]
Use offset instead of indent for match arm
Nick Cameron [Sun, 9 Apr 2017 21:32:09 +0000 (09:32 +1200)]
Merge pull request #1446 from BusyJay/fix-file-lines-check
fix path check
Jay Lee [Sun, 9 Apr 2017 21:25:12 +0000 (05:25 +0800)]
fix path check
Nick Cameron [Thu, 6 Apr 2017 09:29:26 +0000 (21:29 +1200)]
0.8.3
Because I forgot to merge a PR into 0.8.2 that I really wanted :-(
Nick Cameron [Thu, 6 Apr 2017 09:26:13 +0000 (21:26 +1200)]
Merge pull request #1438 from topecongiro/poor-formatting/method-chains
Lookup the last element of 'subexpr_list' instead of the first one
Nick Cameron [Thu, 6 Apr 2017 09:22:29 +0000 (21:22 +1200)]
v0.8.2
Nick Cameron [Thu, 6 Apr 2017 09:17:22 +0000 (21:17 +1200)]
Fix a bug with overlong function calls
Nick Cameron [Thu, 6 Apr 2017 01:06:11 +0000 (13:06 +1200)]
Test fallout
Nick Cameron [Thu, 6 Apr 2017 01:01:19 +0000 (13:01 +1200)]
Implement a max array width
Fixes #1421
topecongiro [Tue, 4 Apr 2017 21:28:47 +0000 (06:28 +0900)]
Lookup the last element of 'subexpr_list' instead of the first one
Closes #1217, #1236, #1389 and #1434.
Nick Cameron [Wed, 5 Apr 2017 23:30:33 +0000 (11:30 +1200)]
Merge pull request #1432 from topecongiro/parse-config
Print error and usage when decoding config file failed
Nick Cameron [Tue, 4 Apr 2017 20:32:21 +0000 (08:32 +1200)]
Merge pull request #1436 from Ryan1729/master
fix for #1419 and #1425
Ryan1729 [Tue, 4 Apr 2017 06:01:33 +0000 (00:01 -0600)]
eliminate nested match
Ryan1729 [Mon, 3 Apr 2017 23:39:14 +0000 (17:39 -0600)]
fix bug by adding boolean argument
Signed-off-by: Ryan1729 <Ryan1729@gmail.com>
Ryan1729 [Mon, 3 Apr 2017 22:15:11 +0000 (16:15 -0600)]
add tests that fail because of comma insertion
Signed-off-by: Ryan1729 <Ryan1729@gmail.com>
topecongiro [Fri, 31 Mar 2017 15:45:02 +0000 (00:45 +0900)]
Change return type of 'from_toml' from 'Config' to 'Result<Config>'
Closes #1426.
Nick Cameron [Sun, 2 Apr 2017 20:40:22 +0000 (08:40 +1200)]
Merge pull request #1435 from iliekturtles/line-length
Do not count `\r` as part of line width.
Nick Cameron [Sun, 2 Apr 2017 20:27:35 +0000 (08:27 +1200)]
Merge pull request #1430 from fintelia/stdin_lines
The --file_lines argument now supports "stdin"
Nick Cameron [Sun, 2 Apr 2017 19:53:18 +0000 (07:53 +1200)]
Merge pull request #1431 from topecongiro/fix-1428
Check existence of pre comment explicitly
Mike Boutin [Sun, 2 Apr 2017 15:05:21 +0000 (11:05 -0400)]
Do not count `\r` as part of line width.
Resolves #1335. Does not attempt to handle a `\r` not followed by a `\n` nor
attempt to handle Unicode intricacies (#6) including zero-width or multi-byte
characters.
Jonathan Behrens [Fri, 31 Mar 2017 17:34:53 +0000 (13:34 -0400)]
Warn about extra files listed in file_lines argument
topecongiro [Fri, 31 Mar 2017 12:57:29 +0000 (21:57 +0900)]
Check existence of pre comment explicitly
This commit fixes #1428.
Jonathan Behrens [Thu, 30 Mar 2017 23:16:06 +0000 (19:16 -0400)]
--file_lines argument now supports "stdin"
Nick Cameron [Thu, 30 Mar 2017 19:43:40 +0000 (08:43 +1300)]
Merge pull request #1413 from Emilgardis/master
Implemented support for workspaces
Nick Cameron [Thu, 30 Mar 2017 19:42:40 +0000 (08:42 +1300)]
Merge pull request #1424 from topecongiro/long-struct
Split long fields in structs
topecongiro [Wed, 29 Mar 2017 11:15:27 +0000 (20:15 +0900)]
Split long fields in structs
This commit splits long fields in structs.
Closes #1412.
Nick Cameron [Thu, 30 Mar 2017 02:49:10 +0000 (15:49 +1300)]
Skip doctests
Nick Cameron [Thu, 30 Mar 2017 02:33:36 +0000 (15:33 +1300)]
Merge pull request #1423 from fintelia/master
Format any statement whose span intersects file_lines
Emil Gardström [Mon, 27 Mar 2017 13:36:43 +0000 (15:36 +0200)]
Implemented support for workspaces
closes rust-lang-nursery/rustfmt#1244
Jonathan Behrens [Wed, 29 Mar 2017 22:50:39 +0000 (18:50 -0400)]
Canonicalize range path in FileLines::intersects()
Jonathan Behrens [Wed, 29 Mar 2017 05:33:14 +0000 (01:33 -0400)]
Format any statement whose span intersects file_lines
Nick Cameron [Wed, 29 Mar 2017 04:51:19 +0000 (17:51 +1300)]
Merge pull request #1415 from topecongiro/remove-duplicates
Remove duplicates
topecongiro [Tue, 28 Mar 2017 14:16:52 +0000 (23:16 +0900)]
Fix a typo
Nick Cameron [Tue, 28 Mar 2017 18:55:48 +0000 (07:55 +1300)]
Merge pull request #1416 from fanzier/master
Omit space before '\n' + comment (fixes #457)
Fabian Zaiser [Tue, 28 Mar 2017 14:32:12 +0000 (16:32 +0200)]
Omit space before '\n' + comment (fixes #457)
topecongiro [Tue, 28 Mar 2017 14:14:48 +0000 (23:14 +0900)]
Remove duplicate definitions
This commit removes duplicated definitions of `type_annotation_separator` and
`type_bound_colon`.
Nick Cameron [Mon, 27 Mar 2017 22:27:00 +0000 (11:27 +1300)]
release v8.1
Nick Cameron [Mon, 27 Mar 2017 22:25:59 +0000 (11:25 +1300)]
test fallout
Nick Cameron [Mon, 27 Mar 2017 22:20:11 +0000 (11:20 +1300)]
Use a release build in the bootstrap script
Nick Cameron [Mon, 27 Mar 2017 22:14:47 +0000 (11:14 +1300)]
fallout - source reformatting
Nick Cameron [Mon, 27 Mar 2017 22:12:15 +0000 (11:12 +1300)]
Use a char len heuristic rather than item count for chain_one_line_max
Nick Cameron [Mon, 27 Mar 2017 22:01:44 +0000 (11:01 +1300)]
Test fallout
Nick Cameron [Mon, 27 Mar 2017 21:58:41 +0000 (10:58 +1300)]
Source formatting fallout
Nick Cameron [Mon, 27 Mar 2017 21:50:58 +0000 (10:50 +1300)]
Put the second element of a chain on its own line when block formatting.
Nick Cameron [Mon, 27 Mar 2017 21:43:46 +0000 (10:43 +1300)]
Support block indent for function calls
Uses the `fn_call_style` option.
Fixes #1358
Nick Cameron [Mon, 27 Mar 2017 01:28:41 +0000 (14:28 +1300)]
Merge pull request #1409 from alobb/1408-empty-tuple-enum-decl
Prevent conversion of empty tuples to unit structs
Aaron Lobb [Sat, 25 Mar 2017 06:58:34 +0000 (23:58 -0700)]
Prevent conversion of empty tuples to unit structs
Fixes #1408
C4K3 [Sun, 26 Mar 2017 05:32:29 +0000 (07:32 +0200)]
Add indent_match_arms option (#1404)
Makes it optional whether to indent arms in match expressions. Setting this
to false may be desirable for people wishing to avoid double-indents, in
that if the match arm is a block, the block will cause an extra indentation
level, and if it isn't a block but just a single line, it's still easy to
see the logic at a glance.
This style is preferred in certain other languages with switch statements,
e.g. Linux style C and the most common Java style.
Aaron Lobb [Sun, 26 Mar 2017 05:21:43 +0000 (22:21 -0700)]
Break `use` statements into multiple lines (#1407)
This fixes how line lengths for use statements with multiple
items don't extend beyond the maximum line length.
Fixes #1400
Jon Gjengset [Sun, 26 Mar 2017 05:16:45 +0000 (01:16 -0400)]
Avoid extra comma in vertical single-field struct patterns (#1403)
* Add (failing) test for #1397
* Fix for #1397
Specifically, we end up double-adding a trailing comma for single-member
struct patterns that are arranged vertically. One is added by write_list
(since such structs return true for needs_trailing_separator), and
another is added by the if in the old code.
C4K3 [Sun, 26 Mar 2017 05:12:56 +0000 (07:12 +0200)]
Warn on unused config options (#1402)
This will make it clear if a user has misspelled a config option, or if
an option has been changed/removed.
Nick Cameron [Tue, 21 Mar 2017 20:05:50 +0000 (09:05 +1300)]
Test and source fallout
Nick Cameron [Mon, 20 Mar 2017 22:23:59 +0000 (11:23 +1300)]
Block indenting for struct lit patterns
Now follows struct_lit_style (and most other struct_lit_ options).
Required a fair bit of refactoring and bug fixes.
Fixes #1311
Robert Gawdzik [Tue, 21 Mar 2017 20:00:33 +0000 (16:00 -0400)]
Make list_files deterministic (Closes #1141) (#1393)
- Use BTreeMap instead
Nick Cameron [Sun, 19 Mar 2017 22:59:08 +0000 (11:59 +1300)]
Unify fn_args_layout and fn_arg_indent
Closes #1390
Nick Cameron [Sun, 19 Mar 2017 22:42:20 +0000 (11:42 +1300)]
Unify a bunch of option types into IndentStyle
Nick Cameron [Sun, 19 Mar 2017 22:35:53 +0000 (11:35 +1300)]
Remove FnArgLayoutStyle::BlockAlways
Nick Cameron [Sun, 19 Mar 2017 22:07:33 +0000 (11:07 +1300)]
Remove BlockIndentStyle::Inherit
Nick Cameron [Sun, 19 Mar 2017 21:27:01 +0000 (10:27 +1300)]
Update RFC toml file
Nick Cameron [Sun, 19 Mar 2017 21:25:37 +0000 (10:25 +1300)]
Block formatting for arrays
Fixes #1331
Nick Cameron [Sun, 12 Mar 2017 22:43:12 +0000 (11:43 +1300)]
Merge branch 'master' of github.com:rust-lang-nursery/rustfmt
Nick Cameron [Sun, 12 Mar 2017 22:42:41 +0000 (11:42 +1300)]
Trailing comma for functions with empty bodies
Nick Cameron [Sun, 12 Mar 2017 22:25:46 +0000 (11:25 +1300)]
Line breaking around generics in tuple structs
C4K3 [Sun, 12 Mar 2017 20:07:33 +0000 (21:07 +0100)]
config: Rename ideal_width -> comment_width (#1370)
Since the config option only affects comment widths, and the previous
name has led to some confusion (see #1321, #1152).
Nick Cameron [Fri, 10 Mar 2017 03:06:05 +0000 (16:06 +1300)]
Reformatting source code
Nick Cameron [Fri, 10 Mar 2017 03:04:08 +0000 (16:04 +1300)]
block generics in traits
Nick Cameron [Fri, 10 Mar 2017 02:58:35 +0000 (15:58 +1300)]
Attempt to fixup impls with long generics
Nick Cameron [Fri, 10 Mar 2017 02:30:47 +0000 (15:30 +1300)]
Block formatting for tuple structs
Follows the fn_args_layout option
Nick Cameron [Fri, 10 Mar 2017 01:29:45 +0000 (14:29 +1300)]
Insert a newline before block-formatted generics
Fixes #1359
Nick Cameron [Thu, 9 Mar 2017 20:45:26 +0000 (09:45 +1300)]
Check we can put the where clause on one line when we think we can
Fixes #1362
Nick Cameron [Thu, 9 Mar 2017 20:26:14 +0000 (09:26 +1300)]
Try harder to format function sigs
Fixes #1363
Nick Cameron [Thu, 9 Mar 2017 02:49:58 +0000 (15:49 +1300)]
Be smarter about finding the span for `..` in patterns
Fixes #1319
Nick Cameron [Thu, 9 Mar 2017 01:47:29 +0000 (14:47 +1300)]
Use trailing commas if block formatting fn args
Fixes #1330