]>
git.lizzy.rs Git - rust.git/log
Kamal Marhubi [Tue, 2 Feb 2016 04:40:45 +0000 (23:40 -0500)]
cleanup: Use const instead of static
Nick Cameron [Mon, 1 Feb 2016 19:12:50 +0000 (08:12 +1300)]
Merge pull request #792 from kamalmarhubi/project-file-lookup-error-handling
bin: Improve error handling in project file lookup
Kamal Marhubi [Mon, 1 Feb 2016 17:55:12 +0000 (12:55 -0500)]
docs: Clarify return type of lookup_project_file
Nick Cameron [Mon, 1 Feb 2016 04:55:30 +0000 (17:55 +1300)]
Merge pull request #793 from kamalmarhubi/expect-formatting
tests: Use Result::expect() throughout
Kamal Marhubi [Sun, 31 Jan 2016 17:58:38 +0000 (12:58 -0500)]
tests: Use Result::expect() throughout
`Result::expect()` was added in Rust 1.4. Using it tidies up the code,
and also helps by printing error details, eg, printing syntax error
details if a regex fails to compile. It adds a colon followed by the
`Debug` output from any error, making the periods in messages
unnecessary.
Kamal Marhubi [Sun, 31 Jan 2016 15:21:48 +0000 (10:21 -0500)]
bin: Improve error handling in project file lookup
Previously errors were being silently ignored. Eg, if `rustfmt` did not
have permission to read a `rustfmt.toml` file, the default configuration
was used without informing the user.
Marcus Klaas de Vries [Sun, 31 Jan 2016 10:33:49 +0000 (11:33 +0100)]
Merge pull request #787 from rust-lang-nursery/mod-empty
Put empty modules on one line
Marcus Klaas de Vries [Sun, 31 Jan 2016 10:33:05 +0000 (11:33 +0100)]
Merge pull request #791 from kamalmarhubi/canonicalize-path
bin: Canonicalize path before looking for project file
Marcus Klaas de Vries [Sun, 31 Jan 2016 10:32:00 +0000 (11:32 +0100)]
Merge pull request #790 from kamalmarhubi/handle-rustfmt-toml-dir
bin: Properly handle a directories named rustfmt.toml
Kamal Marhubi [Sun, 31 Jan 2016 07:01:54 +0000 (02:01 -0500)]
bin: Canonicalize path before looking for project file
Kamal Marhubi [Sun, 31 Jan 2016 06:48:14 +0000 (01:48 -0500)]
bin: Properly handle a directories named rustfmt.toml
`lookup_project_file` could erroneously find a *directory* named
`rustmfmt.toml` if there was one in its lookup path, and so ignore any
configuration file it should have found further up. The error handling
resulted in this silently using the default configuration.
Nick Cameron [Thu, 28 Jan 2016 06:53:41 +0000 (19:53 +1300)]
Put empty modules on one line
Fixes #463
Nick Cameron [Wed, 27 Jan 2016 05:03:32 +0000 (18:03 +1300)]
Merge pull request #785 from DarkDrek/fix-#784
Fix for #784 edge case in comment handling
DarkDrek [Wed, 27 Jan 2016 01:18:05 +0000 (02:18 +0100)]
Fix #784
Nick Cameron [Tue, 26 Jan 2016 09:23:05 +0000 (22:23 +1300)]
Merge pull request #783 from jwazny/issue-588
Added where_trailing_comma option.
Jeremy Wazny [Tue, 26 Jan 2016 05:55:51 +0000 (16:55 +1100)]
Added tests.
Jeremy Wazny [Tue, 26 Jan 2016 04:53:04 +0000 (15:53 +1100)]
Limit when we emit a trailing where clause comma.
Jeremy Wazny [Tue, 26 Jan 2016 01:42:11 +0000 (12:42 +1100)]
Added where_trailing_comma option.
The default is 'false', since a lot of the time there's only a single
predicate.
Nick Cameron [Mon, 25 Jan 2016 17:54:52 +0000 (06:54 +1300)]
Merge pull request #781 from kyeah/itemmac
Format item macros
Nick Cameron [Mon, 25 Jan 2016 17:53:47 +0000 (06:53 +1300)]
Merge pull request #782 from markstory/readme-checkstyle
Update the README concerning write modes.
Kevin Yeh [Sun, 24 Jan 2016 19:11:18 +0000 (13:11 -0600)]
Add item macro tests
Mark Story [Sat, 23 Jan 2016 16:33:50 +0000 (11:33 -0500)]
Updates to readme based on feedback.
Mark Story [Sat, 23 Jan 2016 03:33:59 +0000 (22:33 -0500)]
Update the README concerning write modes.
Add checkstyle and more detail on each of the write modes.
Kevin Yeh [Fri, 22 Jan 2016 19:40:26 +0000 (13:40 -0600)]
Format item macros
Nick Cameron [Fri, 22 Jan 2016 04:48:39 +0000 (17:48 +1300)]
Merge pull request #745 from markstory/checkstyle-output
RFC implementation of checkstyle output
Mark Story [Fri, 22 Jan 2016 03:09:01 +0000 (22:09 -0500)]
Extract helper functions for testing.
These functions help reduce duplication in the test harness and make it
easier to add tests for other write-modes in the future.
Mark Story [Wed, 20 Jan 2016 05:07:01 +0000 (00:07 -0500)]
Get checkstyle tests passing.
Fix up the checkstyle test so they pass. There is still an issue with
the content, but I think that is caused by a problem with how diffs are
being calculated presently.
Mark Story [Tue, 19 Jan 2016 05:02:21 +0000 (00:02 -0500)]
Update checkstyle write mode to take Write arguments.
By accepting Write traits we can write tests using StringBuffer.
Mark Story [Mon, 18 Jan 2016 04:06:00 +0000 (23:06 -0500)]
Start tests for checkstyle.
They don't yet pass, I've clearly misunderstood the existing tests.
Mark Story [Fri, 15 Jan 2016 03:04:24 +0000 (22:04 -0500)]
Clean up function names for checkstyle output.
Marcus Klaas de Vries [Thu, 14 Jan 2016 18:08:46 +0000 (19:08 +0100)]
Merge pull request #774 from rust-lang-nursery/issue698
Fix an off-by-one error due to the comma in a struct lit field
Nick Cameron [Thu, 14 Jan 2016 07:26:15 +0000 (20:26 +1300)]
Fix an off-by-one error due to the comma in a struct lit field
Also allows splitting the field expression on a new line after the field name.
Fixes #698
Nick Cameron [Thu, 14 Jan 2016 05:39:44 +0000 (18:39 +1300)]
Remove reference to 1.4 from README
closes #771
Nick Cameron [Thu, 14 Jan 2016 04:58:23 +0000 (17:58 +1300)]
tweak README.md
Mark Story [Thu, 14 Jan 2016 01:56:35 +0000 (20:56 -0500)]
Use PartialEq/Eq implementation instead of match.
Also cleanup from rebasing onto master.
Mark Story [Wed, 13 Jan 2016 05:22:30 +0000 (00:22 -0500)]
Extract checkstyle output into a separate module.
Rename functions a bit now that they are specific to checkstyle output.
Mark Story [Sat, 9 Jan 2016 03:38:27 +0000 (22:38 -0500)]
Update based on pull request feedback.
* Extract duplicated logic.
* Make checkstyle errors into warnings.
Mark Story [Mon, 4 Jan 2016 04:17:49 +0000 (23:17 -0500)]
Encode XML entities.
Mark Story [Thu, 31 Dec 2015 05:33:51 +0000 (00:33 -0500)]
Remove unused argument.
Mark Story [Thu, 31 Dec 2015 05:33:07 +0000 (00:33 -0500)]
Fix formatting errors.
Mark Story [Wed, 30 Dec 2015 04:54:35 +0000 (23:54 -0500)]
Hack together checkstyle output that compiles.
I'm not sure it does something useful yet though.
Mark Story [Mon, 28 Dec 2015 04:13:32 +0000 (23:13 -0500)]
Start hacking checkstyle output in.
checkstyle now shows up on the option parser, and the code still
compiles/passes tests. Next up will be outputing the XML to stdout.
Marcus Klaas de Vries [Wed, 13 Jan 2016 17:11:11 +0000 (18:11 +0100)]
Merge pull request #769 from svmnotn/write-mode-config
Allow for setting of write-mode via config file. FIxes #215
Victor M. Suarez [Tue, 12 Jan 2016 23:12:48 +0000 (18:12 -0500)]
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!
Marcus Klaas de Vries [Tue, 12 Jan 2016 21:52:34 +0000 (22:52 +0100)]
Merge pull request #766 from ConnorGBrewster/fix-#489
Added option for tighter punctuation in types. fixes #489
Marcus Klaas de Vries [Tue, 12 Jan 2016 20:53:19 +0000 (21:53 +0100)]
Merge pull request #768 from DarkDrek/amend-to-fix-#447
fixes parsing issue #767
Connor Brewster [Tue, 12 Jan 2016 20:51:32 +0000 (13:51 -0700)]
Added test case
Connor Brewster [Tue, 12 Jan 2016 20:42:53 +0000 (13:42 -0700)]
Changed TypeDensity::WhiteSpace to TypeDensity::Wide
Changed eq_str and plus_str assignments to use a match
Marcus Klaas de Vries [Tue, 12 Jan 2016 20:17:45 +0000 (21:17 +0100)]
Merge pull request #757 from ConnorGBrewster/fix-#650
Fix for #650
DarkDrek [Tue, 12 Jan 2016 20:13:59 +0000 (21:13 +0100)]
fixes parsing issue #767
Connor Brewster [Sun, 10 Jan 2016 05:45:58 +0000 (22:45 -0700)]
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
Nick Cameron [Tue, 12 Jan 2016 02:41:16 +0000 (15:41 +1300)]
Merge pull request #765 from DarkDrek/fix-#447-2
Fix #447 2. try
DarkDrek [Tue, 12 Jan 2016 00:32:29 +0000 (01:32 +0100)]
Removed the failing test part since it will work when #754 is accepted
DarkDrek [Tue, 12 Jan 2016 00:09:08 +0000 (01:09 +0100)]
Handle more possible comment position for if else
Extended the test with the new possiblecomment positions
DarkDrek [Sun, 10 Jan 2016 04:20:35 +0000 (05:20 +0100)]
Keep comments between if and else blocks. Fixes #447
Nick Cameron [Tue, 12 Jan 2016 01:49:59 +0000 (14:49 +1300)]
Merge pull request #762 from ConnorGBrewster/fix-#760
Where clause is on same line as fn if fn is empty Fixes #760
Connor Brewster [Mon, 11 Jan 2016 21:47:56 +0000 (14:47 -0700)]
Changed is_block_empty to has_body
Connor Brewster [Mon, 11 Jan 2016 19:26:57 +0000 (12:26 -0700)]
Added option for tighter punctuation in types. fixes #489
Connor Brewster [Mon, 11 Jan 2016 05:06:06 +0000 (22:06 -0700)]
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
cassiersg [Mon, 11 Jan 2016 00:16:52 +0000 (01:16 +0100)]
Merge pull request #756 from cassiersg/missed-comments
Detect (and recover) when comments disappear
Nick Cameron [Sun, 10 Jan 2016 21:45:51 +0000 (10:45 +1300)]
Merge pull request #740 from svmnotn/less_tmp_files
stop creating bk files if there are no changes. Fixes #733
Victor M. Suarez [Sun, 3 Jan 2016 04:21:55 +0000 (23:21 -0500)]
stop creating bk files if there are no changes. Fixes #733
Nick Cameron [Sun, 10 Jan 2016 21:24:14 +0000 (10:24 +1300)]
Merge pull request #758 from cassiersg/issue-717
Fix issue with windows line endings (#717).
Gaëtan Cassiers [Sun, 10 Jan 2016 21:04:30 +0000 (22:04 +0100)]
Document comment::*CodeCharKind
Gaëtan Cassiers [Sun, 10 Jan 2016 15:25:31 +0000 (16:25 +0100)]
Fix issue with windows line endings (#717).
The '\r' character wasn't counted in the line length.
Gaëtan Cassiers [Sun, 10 Jan 2016 14:12:15 +0000 (15:12 +0100)]
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
Marcus Klaas de Vries [Fri, 8 Jan 2016 13:39:04 +0000 (14:39 +0100)]
Merge pull request #749 from sanxiyn/skip-arm
Add commas after skipped arms when needed
Seo Sanghyeon [Fri, 8 Jan 2016 08:03:41 +0000 (17:03 +0900)]
Add commas after skipped arms when needed
Nick Cameron [Thu, 7 Jan 2016 07:15:49 +0000 (20:15 +1300)]
Merge pull request #747 from Manishearth/clippy
Clippy rustfmt
Manish Goregaokar [Thu, 7 Jan 2016 06:43:45 +0000 (12:13 +0530)]
Clippy rustfmt
Nick Cameron [Wed, 6 Jan 2016 03:48:11 +0000 (16:48 +1300)]
Merge pull request #744 from sanxiyn/wildcard-arm
Trailing commas for wildcard arms
Seo Sanghyeon [Wed, 6 Jan 2016 02:02:01 +0000 (11:02 +0900)]
Trailing commas for wildcard arms
Nick Cameron [Mon, 4 Jan 2016 18:40:03 +0000 (07:40 +1300)]
Merge pull request #739 from svmnotn/case_insensitive_config_options
ignore case for config enums. Fixes #738
Victor M. Suarez [Sun, 3 Jan 2016 01:47:10 +0000 (20:47 -0500)]
ignore case for config enums. Fixes #738
Marcus Klaas de Vries [Sat, 2 Jan 2016 16:46:35 +0000 (17:46 +0100)]
Merge pull request #736 from sinhpham/vsc_doc
Add doc for Visual Studio Code plugins
Marcus Klaas de Vries [Fri, 1 Jan 2016 19:21:15 +0000 (20:21 +0100)]
Merge pull request #734 from sinhpham/issue_700
Fixed #700
Sinh Pham [Fri, 1 Jan 2016 17:30:36 +0000 (09:30 -0800)]
Add doc for Visual Studio Code plugins
Sinh Pham [Thu, 31 Dec 2015 23:02:44 +0000 (15:02 -0800)]
Fixed #700, use default color for titles and context in write-mode=diff
Marcus Klaas de Vries [Mon, 28 Dec 2015 16:45:56 +0000 (17:45 +0100)]
Merge pull request #732 from utkarshkukreti/update-diff-to-0.1.8
Update diff to 0.1.8
Utkarsh Kukreti [Mon, 28 Dec 2015 11:53:34 +0000 (17:23 +0530)]
Add tests for #606.
Utkarsh Kukreti [Mon, 28 Dec 2015 06:10:47 +0000 (11:40 +0530)]
Bump diff to 0.1.8. Fixes #606.
Marcus Klaas de Vries [Sun, 27 Dec 2015 14:09:14 +0000 (15:09 +0100)]
Merge pull request #729 from marcusklaas/funky-self
Make fn argument formatting more resilient for complex self types
Marcus Klaas [Sun, 27 Dec 2015 13:25:37 +0000 (14:25 +0100)]
Make fn argument formatting more resilient for complex self types
Nick Cameron [Sat, 26 Dec 2015 20:18:20 +0000 (09:18 +1300)]
Merge pull request #728 from marcusklaas/typed-mut-self
format typed mut self
Nick Cameron [Sat, 26 Dec 2015 20:15:34 +0000 (09:15 +1300)]
Merge pull request #726 from marcusklaas/string-backslashes
Prevent incorrect backslash removal in strings
Marcus Klaas [Fri, 25 Dec 2015 19:59:46 +0000 (20:59 +0100)]
Reduce dependency on pprust
Marcus Klaas [Fri, 25 Dec 2015 18:07:51 +0000 (19:07 +0100)]
Preserve mutability for typed self arguments
Marcus Klaas [Fri, 25 Dec 2015 17:50:40 +0000 (18:50 +0100)]
Prevent incorrect backslash removal in strings
Nick Cameron [Wed, 23 Dec 2015 22:11:56 +0000 (11:11 +1300)]
Merge pull request #722 from matklad/test-ignore-children
test ignored out of line modules
Aleksey Kladov [Wed, 23 Dec 2015 21:15:29 +0000 (00:15 +0300)]
test ignored out of line modules
tests #719
Nick Cameron [Wed, 23 Dec 2015 20:34:18 +0000 (09:34 +1300)]
Merge pull request #720 from matklad/update-lcok
update Cargo.lock to match Cargo.toml
Nick Cameron [Wed, 23 Dec 2015 20:32:44 +0000 (09:32 +1300)]
Merge pull request #719 from matklad/ignore-child-mods
add option to ignore out of line modules
Aleksey Kladov [Wed, 23 Dec 2015 14:31:54 +0000 (17:31 +0300)]
update Cargo.lock to match Cargo.toml
Aleksey Kladov [Wed, 23 Dec 2015 14:25:49 +0000 (17:25 +0300)]
add option to ignore out of line modules
Nick Cameron [Sun, 20 Dec 2015 18:50:02 +0000 (07:50 +1300)]
Merge pull request #713 from JanLikar/master
Add verbose and quiet flags to cargo-fmt
Jan Likar [Sun, 20 Dec 2015 03:19:08 +0000 (04:19 +0100)]
Add verbose and quiet flags to cargo-fmt
Quiet mode supresses rustfmt's stdout, verbose mode prints targets that
are going to be formatted.
Nick Cameron [Thu, 17 Dec 2015 19:43:41 +0000 (08:43 +1300)]
Merge pull request #710 from JanLikar/master
Remove `--write-mode=replace` from cargo-fmt
Jan Likar [Thu, 17 Dec 2015 16:17:43 +0000 (17:17 +0100)]
Remove `--write-mode=replace` from cargo-fmt
Since replace is the default rustfmt write mode, there's no need to
call rustfmt with `--write-mode=replace`. As a bonus, it is now also
possible to override the write-mode.
Marcus Klaas de Vries [Wed, 16 Dec 2015 17:43:19 +0000 (18:43 +0100)]
Merge pull request #704 from Sean1708/patch-1
Fix spelling mistake in cargo-fmt usage string.
Sean Marshallsay [Wed, 16 Dec 2015 12:18:18 +0000 (12:18 +0000)]
Fix spelling mistake in cargo-fmt usage string.