]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoUse block indent when visual indent failed inside closure block
topecongiro [Wed, 3 May 2017 02:21:31 +0000 (11:21 +0900)]
Use block indent when visual indent failed inside closure block

7 years agoMerge pull request #1453 from topecongiro/bug/empty-struct-with-comment
Nick Cameron [Tue, 2 May 2017 01:49:15 +0000 (13:49 +1200)]
Merge pull request #1453 from topecongiro/bug/empty-struct-with-comment

Handle empty tuple struct def with comment properly

7 years agoMerge pull request #1488 from topecongiro/long-match-arm
Nick Cameron [Tue, 2 May 2017 01:49:02 +0000 (13:49 +1200)]
Merge pull request #1488 from topecongiro/long-match-arm

Use block when arm exceeds max_width

7 years agoAdd test for empty tuple struct with comment
topecongiro [Fri, 14 Apr 2017 13:39:20 +0000 (22:39 +0900)]
Add test for empty tuple struct with comment

7 years agoHandle empty tuple struct def properly
topecongiro [Fri, 14 Apr 2017 11:25:47 +0000 (20:25 +0900)]
Handle empty tuple struct def properly

7 years agoUse block when arm exceeds max_width
Seiichi Uchida [Mon, 1 May 2017 11:00:21 +0000 (20:00 +0900)]
Use block when arm exceeds max_width

7 years agoFixup tests
Nick Cameron [Mon, 1 May 2017 23:42:38 +0000 (11:42 +1200)]
Fixup tests

7 years agoMerge pull request #1474 from regexident/configs-guide
Nick Cameron [Mon, 1 May 2017 23:33:53 +0000 (11:33 +1200)]
Merge pull request #1474 from regexident/configs-guide

Added visual configurations guide.

7 years agoMerge pull request #1481 from regexident/system-error
Nick Cameron [Mon, 1 May 2017 23:17:48 +0000 (11:17 +1200)]
Merge pull request #1481 from regexident/system-error

Improve error message for missing source/target test file

7 years agoMerge pull request #1471 from regexident/type_punctuation_density
Nick Cameron [Mon, 1 May 2017 23:17:35 +0000 (11:17 +1200)]
Merge pull request #1471 from regexident/type_punctuation_density

Made `type_punctuation_density` apply too all `+` in types

7 years agoMade `type_punctuation_density` apply too all `+` in types
Vincent Esche [Mon, 24 Apr 2017 17:59:21 +0000 (19:59 +0200)]
Made `type_punctuation_density` apply too all `+` in types

7 years agoMerge pull request #1482 from regexident/configs-tests
Nick Cameron [Mon, 1 May 2017 23:00:09 +0000 (11:00 +1200)]
Merge pull request #1482 from regexident/configs-tests

Add source/target tests for each config option

7 years agoMerge pull request #1491 from regexident/where_density
Nick Cameron [Mon, 1 May 2017 22:50:32 +0000 (10:50 +1200)]
Merge pull request #1491 from regexident/where_density

Add todo on equal output for `where_density = Tall` or `Vertical`

7 years agoMerge pull request #1489 from regexident/gitignore
Nick Cameron [Mon, 1 May 2017 22:50:03 +0000 (10:50 +1200)]
Merge pull request #1489 from regexident/gitignore

Improve gitignore, adding ‘.DS_Store’

7 years agoMerge pull request #1487 from topecongiro/issue1470
Nick Cameron [Mon, 1 May 2017 22:45:23 +0000 (10:45 +1200)]
Merge pull request #1487 from topecongiro/issue1470

Use block indent when visual indent exceeds max_width

7 years agoMerge pull request #1454 from topecongiro/match
Nick Cameron [Mon, 1 May 2017 22:40:31 +0000 (10:40 +1200)]
Merge pull request #1454 from topecongiro/match

Format nested mathces properly.

7 years agoMerge pull request #1486 from topecongiro/refactoring
Nick Cameron [Mon, 1 May 2017 22:30:11 +0000 (10:30 +1200)]
Merge pull request #1486 from topecongiro/refactoring

Refactor source codes

7 years agoAdd visual configurations guide.
Vincent Esche [Wed, 26 Apr 2017 15:36:10 +0000 (17:36 +0200)]
Add visual configurations guide.

7 years agoImprove error message for missing source/target test file
Vincent Esche [Sun, 30 Apr 2017 21:44:12 +0000 (23:44 +0200)]
Improve error message for missing source/target test file

7 years agoAdd todo on equal output for `where_density = Tall` or `Vertical`
Vincent Esche [Mon, 1 May 2017 20:01:19 +0000 (22:01 +0200)]
Add todo on equal output for `where_density = Tall` or `Vertical`

7 years agoRemove generics_style option
Nick Cameron [Mon, 1 May 2017 19:56:46 +0000 (07:56 +1200)]
Remove generics_style option

7 years agoAdd source/target tests for each config option
Vincent Esche [Sun, 30 Apr 2017 21:49:39 +0000 (23:49 +0200)]
Add source/target tests for each config option

7 years agoImprove gitignore, adding ‘.DS_Store’
Vincent Esche [Mon, 1 May 2017 13:50:08 +0000 (15:50 +0200)]
Improve gitignore, adding ‘.DS_Store’

7 years agoUse block indent when visual indent exceeds max_width
Seiichi Uchida [Mon, 1 May 2017 09:52:43 +0000 (18:52 +0900)]
Use block indent when visual indent exceeds max_width

7 years agoAdd tests for visual indent struct tuple
topecongiro [Wed, 19 Apr 2017 14:34:45 +0000 (23:34 +0900)]
Add tests for visual indent struct tuple

7 years agoRemove TODO from 'format_tuple_struct'
topecongiro [Wed, 19 Apr 2017 14:33:03 +0000 (23:33 +0900)]
Remove TODO from 'format_tuple_struct'

7 years agoRemove TODO from 'rewrite_generics'
topecongiro [Wed, 19 Apr 2017 13:48:45 +0000 (22:48 +0900)]
Remove TODO from 'rewrite_generics'

7 years agoRefactor Shape
topecongiro [Wed, 19 Apr 2017 09:52:56 +0000 (18:52 +0900)]
Refactor Shape

7 years agoRemove duplicates
topecongiro [Fri, 14 Apr 2017 10:27:05 +0000 (19:27 +0900)]
Remove duplicates

7 years agoUse 'first_line_width'
topecongiro [Wed, 19 Apr 2017 01:14:27 +0000 (10:14 +0900)]
Use 'first_line_width'

7 years agoMerge pull request #1473 from topecongiro/bug/no-such-file-or-directory
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

7 years agoRemove where_indent option
Nick Cameron [Mon, 1 May 2017 04:05:38 +0000 (16:05 +1200)]
Remove where_indent option

7 years agoMerge pull request #1469 from topecongiro/bug/chains
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

7 years agoMerge pull request #1459 from shioju/master
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

7 years agoMerge pull request #1457 from diaevd/master
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

7 years agoMerge pull request #1461 from DarkEld3r/1447-line-length-in-chars
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)

7 years agoMerge pull request #1455 from topecongiro/unary-op
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

7 years agoPrevent panicking against directories or non-existent files
Seiichi Uchida [Wed, 26 Apr 2017 08:29:56 +0000 (17:29 +0900)]
Prevent panicking against directories or non-existent files

7 years agoFormat source codes
topecongiro [Mon, 24 Apr 2017 07:50:11 +0000 (16:50 +0900)]
Format source codes

7 years agoRemove '+ 1' when counting the length of chains
topecongiro [Mon, 24 Apr 2017 07:48:05 +0000 (16:48 +0900)]
Remove '+ 1' when counting the length of chains

7 years agoFix line length calculation (should be in chars, not bytes)
Stanislav Tkach [Wed, 19 Apr 2017 14:49:03 +0000 (17:49 +0300)]
Fix line length calculation (should be in chars, not bytes)

7 years agoShow exit codes' meanings with the rustfmt help message
Sheng Hau [Tue, 18 Apr 2017 16:23:57 +0000 (00:23 +0800)]
Show exit codes' meanings with the rustfmt help message

7 years agoformat_lines: fix line_len for config.max_width
Evgeny Duzhakov [Tue, 18 Apr 2017 11:31:53 +0000 (14:31 +0300)]
format_lines: fix line_len for config.max_width

7 years agoProhibit long return val from 'rewrite_closure_block'
topecongiro [Mon, 17 Apr 2017 13:57:07 +0000 (22:57 +0900)]
Prohibit long return val from 'rewrite_closure_block'

7 years agoFormat source codes
topecongiro [Sat, 15 Apr 2017 09:42:45 +0000 (18:42 +0900)]
Format source codes

7 years agoAdd heuristic choosing block or visual indent for unary op based on span
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

7 years agoCheck the length of the first line of the last method in the chain
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

7 years agoFormat source codes
topecongiro [Sat, 15 Apr 2017 07:22:54 +0000 (16:22 +0900)]
Format source codes

7 years agoUse offset instead of indent for match arm
topecongiro [Sat, 15 Apr 2017 07:22:26 +0000 (16:22 +0900)]
Use offset instead of indent for match arm

7 years agoMerge pull request #1446 from BusyJay/fix-file-lines-check
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

7 years agofix path check
Jay Lee [Sun, 9 Apr 2017 21:25:12 +0000 (05:25 +0800)]
fix path check

7 years ago0.8.3
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 :-(

7 years agoMerge pull request #1438 from topecongiro/poor-formatting/method-chains
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

7 years agov0.8.2
Nick Cameron [Thu, 6 Apr 2017 09:22:29 +0000 (21:22 +1200)]
v0.8.2

7 years agoFix a bug with overlong function calls
Nick Cameron [Thu, 6 Apr 2017 09:17:22 +0000 (21:17 +1200)]
Fix a bug with overlong function calls

7 years agoTest fallout
Nick Cameron [Thu, 6 Apr 2017 01:06:11 +0000 (13:06 +1200)]
Test fallout

7 years agoImplement a max array width
Nick Cameron [Thu, 6 Apr 2017 01:01:19 +0000 (13:01 +1200)]
Implement a max array width

Fixes #1421

7 years agoLookup the last element of 'subexpr_list' instead of the first one
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.

7 years agoMerge pull request #1432 from topecongiro/parse-config
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

7 years agoMerge pull request #1436 from Ryan1729/master
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

7 years agoeliminate nested match
Ryan1729 [Tue, 4 Apr 2017 06:01:33 +0000 (00:01 -0600)]
eliminate nested match

7 years agofix bug by adding boolean argument
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>
7 years agoadd tests that fail because of comma insertion
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>
7 years agoChange return type of 'from_toml' from 'Config' to 'Result<Config>'
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.

7 years agoMerge pull request #1435 from iliekturtles/line-length
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.

7 years agoMerge pull request #1430 from fintelia/stdin_lines
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"

7 years agoMerge pull request #1431 from topecongiro/fix-1428
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

7 years agoDo not count `\r` as part of line width.
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.

7 years agoWarn about extra files listed in file_lines argument
Jonathan Behrens [Fri, 31 Mar 2017 17:34:53 +0000 (13:34 -0400)]
Warn about extra files listed in file_lines argument

7 years agoCheck existence of pre comment explicitly
topecongiro [Fri, 31 Mar 2017 12:57:29 +0000 (21:57 +0900)]
Check existence of pre comment explicitly

This commit fixes #1428.

7 years ago--file_lines argument now supports "stdin"
Jonathan Behrens [Thu, 30 Mar 2017 23:16:06 +0000 (19:16 -0400)]
--file_lines argument now supports "stdin"

7 years agoMerge pull request #1413 from Emilgardis/master
Nick Cameron [Thu, 30 Mar 2017 19:43:40 +0000 (08:43 +1300)]
Merge pull request #1413 from Emilgardis/master

Implemented support for workspaces

7 years agoMerge pull request #1424 from topecongiro/long-struct
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

7 years agoSplit 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.

7 years agoSkip doctests
Nick Cameron [Thu, 30 Mar 2017 02:49:10 +0000 (15:49 +1300)]
Skip doctests

7 years agoMerge pull request #1423 from fintelia/master
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

7 years agoImplemented support for workspaces
Emil Gardström [Mon, 27 Mar 2017 13:36:43 +0000 (15:36 +0200)]
Implemented support for workspaces

closes rust-lang-nursery/rustfmt#1244

7 years agoCanonicalize range path in FileLines::intersects()
Jonathan Behrens [Wed, 29 Mar 2017 22:50:39 +0000 (18:50 -0400)]
Canonicalize range path in FileLines::intersects()

7 years agoFormat any statement whose span intersects file_lines
Jonathan Behrens [Wed, 29 Mar 2017 05:33:14 +0000 (01:33 -0400)]
Format any statement whose span intersects file_lines

7 years agoMerge pull request #1415 from topecongiro/remove-duplicates
Nick Cameron [Wed, 29 Mar 2017 04:51:19 +0000 (17:51 +1300)]
Merge pull request #1415 from topecongiro/remove-duplicates

Remove duplicates

7 years agoFix a typo
topecongiro [Tue, 28 Mar 2017 14:16:52 +0000 (23:16 +0900)]
Fix a typo

7 years agoMerge pull request #1416 from fanzier/master
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)

7 years agoOmit 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)

7 years agoRemove duplicate definitions
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`.

7 years agorelease v8.1
Nick Cameron [Mon, 27 Mar 2017 22:27:00 +0000 (11:27 +1300)]
release v8.1

7 years agotest fallout
Nick Cameron [Mon, 27 Mar 2017 22:25:59 +0000 (11:25 +1300)]
test fallout

7 years agoUse a release build in the bootstrap script
Nick Cameron [Mon, 27 Mar 2017 22:20:11 +0000 (11:20 +1300)]
Use a release build in the bootstrap script

7 years agofallout - source reformatting
Nick Cameron [Mon, 27 Mar 2017 22:14:47 +0000 (11:14 +1300)]
fallout - source reformatting

7 years agoUse a char len heuristic rather than item count for chain_one_line_max
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

7 years agoTest fallout
Nick Cameron [Mon, 27 Mar 2017 22:01:44 +0000 (11:01 +1300)]
Test fallout

7 years agoSource formatting fallout
Nick Cameron [Mon, 27 Mar 2017 21:58:41 +0000 (10:58 +1300)]
Source formatting fallout

7 years agoPut the second element of a chain on its own line when block formatting.
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.

7 years agoSupport block indent for function calls
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

7 years agoMerge pull request #1409 from alobb/1408-empty-tuple-enum-decl
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

7 years agoPrevent 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

7 years agoAdd indent_match_arms option (#1404)
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.

7 years agoBreak `use` statements into multiple lines (#1407)
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

7 years agoAvoid extra comma in vertical single-field struct patterns (#1403)
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.

7 years agoWarn on unused config options (#1402)
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.

7 years agoTest and source fallout
Nick Cameron [Tue, 21 Mar 2017 20:05:50 +0000 (09:05 +1300)]
Test and source fallout