Commit Graph

812 Commits

Author SHA1 Message Date
Nick Cameron
c024008bd1 tweak README.md 2016-01-14 17:58:23 +13:00
Marcus Klaas de Vries
3f7741bb0c Merge pull request #769 from svmnotn/write-mode-config
Allow for setting of write-mode via config file. FIxes #215
2016-01-13 18:11:11 +01:00
Victor M. Suarez
4f8938c616 Allow for setting of write-mode via config file. FIxes #215
Also from @marcusklaas:
 Refactor code output functions

 Specifically, `write_all_files` no longer returns a HashMap. It would sometimes
 contain items, and sometimes be empty. When "fixed" newlines are required, this
 must now be done with a separate call. The tests use this strategy and should now pass!
2016-01-12 18:12:48 -05:00
Marcus Klaas de Vries
ba465e0fc2 Merge pull request #766 from ConnorGBrewster/fix-#489
Added option for tighter punctuation in types. fixes #489
2016-01-12 22:52:34 +01:00
Marcus Klaas de Vries
4cefecb495 Merge pull request #768 from DarkDrek/amend-to-fix-#447
fixes parsing issue #767
2016-01-12 21:53:19 +01:00
Connor Brewster
7f8b9bd356 Added test case 2016-01-12 13:51:32 -07:00
Connor Brewster
479b69266b Changed TypeDensity::WhiteSpace to TypeDensity::Wide
Changed eq_str and plus_str assignments to use a match
2016-01-12 13:42:53 -07:00
Marcus Klaas de Vries
b99e8eda29 Merge pull request #757 from ConnorGBrewster/fix-#650
Fix for #650
2016-01-12 21:17:45 +01:00
DarkDrek
937e26d4e1 fixes parsing issue #767 2016-01-12 21:13:59 +01:00
Connor Brewster
d7a3256d40 If where is on the same line as the impl, { is put on the same line fixes #650
factored if clause into a separate function
2016-01-11 21:26:45 -07:00
Nick Cameron
36b82f3b00 Merge pull request #765 from DarkDrek/fix-#447-2
Fix #447 2. try
2016-01-12 15:41:16 +13:00
DarkDrek
20ccc7bf8e Removed the failing test part since it will work when #754 is accepted 2016-01-12 03:09:19 +01:00
DarkDrek
4da91e7df2 Handle more possible comment position for if else
Extended the test with the new possiblecomment positions
2016-01-12 03:08:48 +01:00
DarkDrek
b0eb0f5daa Keep comments between if and else blocks. Fixes #447 2016-01-12 03:08:16 +01:00
Nick Cameron
bdcc815b18 Merge pull request #762 from ConnorGBrewster/fix-#760
Where clause is on same line as fn if fn is empty Fixes #760
2016-01-12 14:49:59 +13:00
Connor Brewster
749697d845 Changed is_block_empty to has_body 2016-01-11 14:47:56 -07:00
Connor Brewster
dba2d8afd5 Added option for tighter punctuation in types. fixes #489 2016-01-11 12:26:57 -07:00
Connor Brewster
6b741a7194 Where clause is on same line as fn if fn is empty fix-#760
only applies if fn_empty_single_line is set to true
2016-01-10 22:06:06 -07:00
cassiersg
b236819f72 Merge pull request #756 from cassiersg/missed-comments
Detect (and recover) when comments disappear
2016-01-11 01:16:52 +01:00
Nick Cameron
0badc128f7 Merge pull request #740 from svmnotn/less_tmp_files
stop creating bk files if there are no changes. Fixes #733
2016-01-11 10:45:51 +13:00
Victor M. Suarez
56a3aac2b5 stop creating bk files if there are no changes. Fixes #733 2016-01-10 16:37:13 -05:00
Nick Cameron
cb085fc9ad Merge pull request #758 from cassiersg/issue-717
Fix issue with windows line endings (#717).
2016-01-11 10:24:14 +13:00
Gaëtan Cassiers
b117d7b2b8 Document comment::*CodeCharKind 2016-01-10 22:04:30 +01:00
Gaëtan Cassiers
598fcdddc3 Fix issue with windows line endings (#717).
The '\r' character wasn't counted in the line length.
2016-01-10 16:25:31 +01:00
Gaëtan Cassiers
9f98f725cb Detect when comments disappear
When the reformatted code doesn't contain the same quantity of comments
as the original code, use the original code instead of the reformatted
code.
This is done for all expressions and `let` statements.

This should be used at the finest grained level possible, to avoid that
a small disappearing comment prevents a big chunk of code to be
reformatted.

Kind of fixes (avoid disappearing comments, but prevents a good
formatting is such case) #285 #225 #563 #743
2016-01-10 15:20:58 +01:00
Marcus Klaas de Vries
66abad9445 Merge pull request #749 from sanxiyn/skip-arm
Add commas after skipped arms when needed
2016-01-08 14:39:04 +01:00
Seo Sanghyeon
16b348dd9c Add commas after skipped arms when needed 2016-01-08 22:15:54 +09:00
Nick Cameron
bd32589ff5 Merge pull request #747 from Manishearth/clippy
Clippy rustfmt
2016-01-07 20:15:49 +13:00
Manish Goregaokar
ffe9c9d834 Clippy rustfmt 2016-01-07 12:17:22 +05:30
Nick Cameron
f5bd7b76e0 Merge pull request #744 from sanxiyn/wildcard-arm
Trailing commas for wildcard arms
2016-01-06 16:48:11 +13:00
Seo Sanghyeon
f9f7235c1b Trailing commas for wildcard arms 2016-01-06 11:02:01 +09:00
Nick Cameron
d290271db4 Merge pull request #739 from svmnotn/case_insensitive_config_options
ignore case for config enums. Fixes #738
2016-01-05 07:40:03 +13:00
Victor M. Suarez
f6497ca3fb ignore case for config enums. Fixes #738 2016-01-02 20:47:58 -05:00
Marcus Klaas de Vries
fe58ff1a15 Merge pull request #736 from sinhpham/vsc_doc
Add doc for Visual Studio Code plugins
2016-01-02 17:46:35 +01:00
Marcus Klaas de Vries
8d5bb2bb17 Merge pull request #734 from sinhpham/issue_700
Fixed #700
2016-01-01 20:21:15 +01:00
Sinh Pham
b5e9088ed3 Add doc for Visual Studio Code plugins 2016-01-01 09:30:36 -08:00
Sinh Pham
122fc4bc65 Fixed #700, use default color for titles and context in write-mode=diff 2016-01-01 09:14:39 -08:00
Marcus Klaas de Vries
0698f0255a Merge pull request #732 from utkarshkukreti/update-diff-to-0.1.8
Update diff to 0.1.8
2015-12-28 17:45:56 +01:00
Utkarsh Kukreti
15e6b7d335 Add tests for #606. 2015-12-28 17:23:34 +05:30
Utkarsh Kukreti
6a12818c23 Bump diff to 0.1.8. Fixes #606. 2015-12-28 17:22:03 +05:30
Marcus Klaas de Vries
e72c245023 Merge pull request #729 from marcusklaas/funky-self
Make fn argument formatting more resilient for complex self types
2015-12-27 15:09:14 +01:00
Marcus Klaas
291aa1b228 Make fn argument formatting more resilient for complex self types 2015-12-27 14:25:37 +01:00
Nick Cameron
71508b310b Merge pull request #728 from marcusklaas/typed-mut-self
format typed mut self
2015-12-27 09:18:20 +13:00
Nick Cameron
856bf043d1 Merge pull request #726 from marcusklaas/string-backslashes
Prevent incorrect backslash removal in strings
2015-12-27 09:15:34 +13:00
Marcus Klaas
2069abcca4 Reduce dependency on pprust 2015-12-25 20:59:46 +01:00
Marcus Klaas
954dd0869e Preserve mutability for typed self arguments 2015-12-25 19:07:51 +01:00
Marcus Klaas
1e80fd2dcd Prevent incorrect backslash removal in strings 2015-12-25 18:50:40 +01:00
Nick Cameron
c0b7de7c52 Merge pull request #722 from matklad/test-ignore-children
test ignored out of line modules
2015-12-24 11:11:56 +13:00
Aleksey Kladov
e3123ce88c test ignored out of line modules
tests #719
2015-12-24 00:15:29 +03:00
Nick Cameron
55506b8da0 Merge pull request #720 from matklad/update-lcok
update Cargo.lock to match Cargo.toml
2015-12-24 09:34:18 +13:00