Marcus Klaas de Vries
9756c654c9
Merge pull request #800 from kamalmarhubi/gitignore-rust-bk
...
gitignore .rs.bk files
2016-02-03 06:07:53 +01:00
Marcus Klaas de Vries
aabe6e7668
Merge pull request #802 from kamalmarhubi/remove-args-doc
...
cleanup: Remove documentation of deleted parameter
2016-02-03 06:07:07 +01:00
Kamal Marhubi
70c9b55ecb
cleanup: Remove documentation of deleted parameter
...
The `args` parameter was removed in 579fb34
.
2016-02-02 12:37:38 -05:00
sid
46242ed10e
Add support for the config-path option
...
Adds a config-path option for rustfmt. If this argument is provided,
it recursively searches the config-path for a rustfmt.toml file.
If file is not found, reverts to searching the file input path for the
config file or uses default options.
2016-02-02 15:08:44 +05:30
Kamal Marhubi
5ac67adb40
gitignore .rs.bk files
...
These clutter up `git status` output when working on rustfmt.
2016-02-01 23:58:38 -05:00
Kamal Marhubi
8b601812a6
cleanup: Use const instead of static
2016-02-01 23:40:45 -05:00
Kamal Marhubi
52f98c763b
config: Disable report_todo by default
2016-02-01 20:29:44 -05:00
Kamal Marhubi
85d14617ce
config: Make panic messages more useful
2016-02-01 18:40:32 -05:00
Nick Cameron
ee32615df1
Merge pull request #792 from kamalmarhubi/project-file-lookup-error-handling
...
bin: Improve error handling in project file lookup
2016-02-02 08:12:50 +13:00
Kamal Marhubi
0f254bb343
docs: Clarify return type of lookup_project_file
2016-02-01 12:55:12 -05:00
Nick Cameron
86572d455b
Merge pull request #793 from kamalmarhubi/expect-formatting
...
tests: Use Result::expect() throughout
2016-02-01 17:55:30 +13:00
Kamal Marhubi
2b991bc260
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.
2016-01-31 13:10:09 -05:00
Kamal Marhubi
98726d0a53
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.
2016-01-31 10:28:47 -05:00
Marcus Klaas de Vries
edcc4ec6c0
Merge pull request #787 from rust-lang-nursery/mod-empty
...
Put empty modules on one line
2016-01-31 11:33:49 +01:00
Marcus Klaas de Vries
1d216e1829
Merge pull request #791 from kamalmarhubi/canonicalize-path
...
bin: Canonicalize path before looking for project file
2016-01-31 11:33:05 +01:00
Marcus Klaas de Vries
02f38558cf
Merge pull request #790 from kamalmarhubi/handle-rustfmt-toml-dir
...
bin: Properly handle a directories named rustfmt.toml
2016-01-31 11:32:00 +01:00
Kamal Marhubi
7a0d8be405
bin: Canonicalize path before looking for project file
2016-01-31 02:01:54 -05:00
Kamal Marhubi
bd9ad6b0a0
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.
2016-01-31 01:49:29 -05:00
Nick Cameron
a0e85f9a5f
Put empty modules on one line
...
Fixes #463
2016-01-28 19:53:41 +13:00
Nick Cameron
02302d2800
Don't reformat strings if we don't have to.
...
Specifically if no line exceeds the allowed width and we aren't moving the string to a new offset
2016-01-28 19:14:08 +13:00
Nick Cameron
fb17a44584
Merge pull request #785 from DarkDrek/fix-#784
...
Fix for #784 edge case in comment handling
2016-01-27 18:03:32 +13:00
DarkDrek
feb09a42f5
Fix #784
2016-01-27 02:18:05 +01:00
Nick Cameron
4344c51c80
Merge pull request #783 from jwazny/issue-588
...
Added where_trailing_comma option.
2016-01-26 22:23:05 +13:00
Jeremy Wazny
d23628c91b
Added tests.
2016-01-26 16:55:51 +11:00
Jeremy Wazny
7297bc320f
Limit when we emit a trailing where clause comma.
2016-01-26 16:39:00 +11:00
Jeremy Wazny
d82d3b2cd1
Added where_trailing_comma option.
...
The default is 'false', since a lot of the time there's only a single
predicate.
2016-01-26 12:42:11 +11:00
Nick Cameron
3b24f6f7c4
Merge pull request #781 from kyeah/itemmac
...
Format item macros
2016-01-26 06:54:52 +13:00
Nick Cameron
6a077bee00
Merge pull request #782 from markstory/readme-checkstyle
...
Update the README concerning write modes.
2016-01-26 06:53:47 +13:00
Kevin Yeh
7fc70a1753
Add item macro tests
2016-01-24 13:11:18 -06:00
Mark Story
2ffb5fde9d
Updates to readme based on feedback.
2016-01-23 11:33:50 -05:00
Mark Story
561323e4cd
Update the README concerning write modes.
...
Add checkstyle and more detail on each of the write modes.
2016-01-22 22:33:59 -05:00
Kevin Yeh
f01ed6f507
Format item macros
2016-01-22 13:43:18 -06:00
Nick Cameron
81516fe8ca
Merge pull request #745 from markstory/checkstyle-output
...
RFC implementation of checkstyle output
2016-01-22 17:48:39 +13:00
Mark Story
e9e5621307
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.
2016-01-21 22:28:17 -05:00
Mark Story
9c275833fc
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.
2016-01-20 00:07:01 -05:00
Mark Story
d8c6f5954a
Update checkstyle write mode to take Write arguments.
...
By accepting Write traits we can write tests using StringBuffer.
2016-01-19 00:23:38 -05:00
Mark Story
66d4faf53f
Start tests for checkstyle.
...
They don't yet pass, I've clearly misunderstood the existing tests.
2016-01-18 22:44:10 -05:00
Mark Story
5632831bd1
Clean up function names for checkstyle output.
2016-01-14 22:04:24 -05:00
Marcus Klaas de Vries
6c63ed08ce
Merge pull request #774 from rust-lang-nursery/issue698
...
Fix an off-by-one error due to the comma in a struct lit field
2016-01-14 19:08:46 +01:00
Nick Cameron
f0ca7aec24
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
2016-01-14 20:26:15 +13:00
Nick Cameron
a37309ca0d
Remove reference to 1.4 from README
...
closes #771
2016-01-14 18:39:44 +13:00
Nick Cameron
c024008bd1
tweak README.md
2016-01-14 17:58:23 +13:00
Mark Story
add80569ff
Use PartialEq/Eq implementation instead of match.
...
Also cleanup from rebasing onto master.
2016-01-13 21:07:38 -05:00
Mark Story
58410ddd93
Extract checkstyle output into a separate module.
...
Rename functions a bit now that they are specific to checkstyle output.
2016-01-13 21:03:25 -05:00
Mark Story
3c968e1e38
Update based on pull request feedback.
...
* Extract duplicated logic.
* Make checkstyle errors into warnings.
2016-01-13 21:02:50 -05:00
Mark Story
de10545906
Encode XML entities.
2016-01-13 21:02:50 -05:00
Mark Story
c3632befb5
Remove unused argument.
2016-01-13 21:02:05 -05:00
Mark Story
309f284dfb
Fix formatting errors.
2016-01-13 21:01:27 -05:00
Mark Story
d188854e13
Hack together checkstyle output that compiles.
...
I'm not sure it does something useful yet though.
2016-01-13 21:01:26 -05:00
Mark Story
0c9f27fe5e
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.
2016-01-13 20:59:18 -05:00