Commit Graph

23 Commits

Author SHA1 Message Date
Mark Story
5632831bd1 Clean up function names for checkstyle output. 2016-01-14 22:04:24 -05: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
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
Victor M. Suarez
56a3aac2b5 stop creating bk files if there are no changes. Fixes #733 2016-01-10 16:37:13 -05:00
Johan Sköld
add37b9c49 Adds a "Native" option to newline_style.
By using it one will get \r\n line endings on Windows, and \n line endings
on other platforms.
2015-11-15 04:16:34 -08:00
Johann
154e20a04f Address review concerns 2015-11-03 09:16:33 +01:00
Johann
fcc62cbbe0 Stdin support
Adds support for receiving input from stdin in case no file was
specified. This is useful for editor/IDE integrations and other tooling.

To achieve clean output a new write-mode option called plain was added,
this option is mandatory when using stdin.
2015-11-02 20:45:45 +01:00
Ravi Shankar
d135217db2 show rustfmt coverage! 2015-10-24 15:22:37 +05:30
Marcus Klaas
199d40fa55 Increase default function call width limit 2015-10-06 22:27:11 +02:00
Nick Cameron
99d71a164a Changes to source formatting 2015-09-26 13:58:12 +12:00
Marcus Klaas
e72d488281 Refactor test code
No longer use callbacks or thread::catch_panic; reduce stdout spew; guard against rustfmt breaking the column limit.
2015-09-18 22:34:46 +02:00
Sinh Pham
e7a5f9327e Add diff write mode https://github.com/nrc/rustfmt/issues/261 2015-09-10 18:30:07 -04:00
Nick Cameron
a43e2b5ae8 Formatting 2015-08-20 08:11:14 +12:00
Marcus Klaas
10a80bb8be Add an option to forgo backups 2015-08-19 21:31:27 +02:00
Gaëtan Cassiers
5a29d2f081 Fix nits for filemap 2015-08-02 14:49:35 +02:00
Gaëtan Cassiers
5b5927996f Kill ChangeSet and replace remaining part by FileMap
Also fix style issues
Cargo update to get fixes of strings.rs (was cause of a misformatted
function call).
2015-08-02 13:33:01 +02:00