Nick Cameron
9761cf71d8
Tests
2016-04-22 18:53:39 +12:00
Kamal Marhubi
14dbac5fd7
config: Use write_mode from config
...
This commit tidies up handling of `write_mode` by setting it in the
config at the start, and removing the `write_mode` parameter threaded
throughout the formatting process.
2016-02-08 22:52:44 -05:00
DarkDrek
feb09a42f5
Fix #784
2016-01-27 02:18:05 +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
Manish Goregaokar
ffe9c9d834
Clippy rustfmt
2016-01-07 12:17:22 +05:30
Seo Sanghyeon
2b11d84119
Apply Clippy
2015-11-25 15:39:15 +09:00
Nick Cameron
7809e3bb18
Merge pull request #634 from Marwes/block_comment_crlf
...
Avoid adding an extra newline after block comments
2015-11-21 12:47:53 +13:00
Markus Westerlind
ad7dc420cd
Avoid adding an extra newline after block comments
...
When block comments were rewritten to line comments they check if a new line needs to be added and adds one if needed. It only checked for '\n' however which would cause a newline to be added even if the comment was ended by "\r\n"
2015-11-20 23:31:05 +01:00
Marcus Klaas
8f3a29d1a7
Blockify multiline match arms
2015-11-20 21:05:10 +01:00
Ravi Shankar
d135217db2
show rustfmt coverage!
2015-10-24 15:22:37 +05:30
Marcus Klaas
e8447a8210
Fix large block comments
2015-10-19 23:06:36 +02:00
Marcus Klaas
3970748f59
Remove overflow indentation
2015-10-19 23:06:36 +02:00
Marcus Klaas
cf0f5ca814
Implement CommentCodeSlices
2015-10-19 23:06:35 +02:00
Sinh Pham
82a6cca010
Refactor write_snippet
2015-10-17 11:35:47 -07:00
Marcus Klaas
ccd404ac6f
Try "overflowing" the final function argument when it's a closure
...
This means that we try formatting the last argument of a function call with block
indentation instead of visual indentation when it is a closure and its first line
fits on the same line as the first arguments.
2015-10-08 23:40:33 +02:00
Marcus Klaas
84718b5b90
Format rustfmt's own indices
2015-10-02 11:48:52 +02:00
Nick Cameron
99d71a164a
Changes to source formatting
2015-09-26 13:58:12 +12:00
Pavel Sountsov
01bdcd0014
Remove unnecessary config parameter from format_missing_with_indent.
2015-09-19 10:44:28 -07:00
Pavel Sountsov
03e1b27826
Add Indent::none(), remove make_indent.
2015-09-19 10:36:45 -07:00
Pavel Sountsov
d4108a3029
Initial implementation of hard tab indentation.
2015-09-19 10:36:45 -07:00
Marcus Klaas
c680bb4030
Implement basic chain formatting
2015-09-11 00:52:16 +02:00
Gaëtan Cassiers
76ea7e3b64
Fix #190 for submodules
2015-08-24 22:01:01 +02:00
Sinh Pham
49cae9c485
Fix https://github.com/nrc/rustfmt/issues/190
2015-08-23 08:37:43 -04: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
Gaëtan Cassiers
0eab4bf430
Remove ChangeSet of FmtVisitor
2015-08-02 13:12:51 +02:00
Gaëtan Cassiers
990a123e1c
Run rustfmt on the code
2015-07-03 11:13:28 +02:00
Nick Cameron
2e485ea086
Better attribute handling
2015-04-29 15:03:15 +12:00
Nick Cameron
4c869a1b9d
Extract out more files
2015-04-21 21:01:19 +12:00
Nick Cameron
8ca3dc063e
Refactor missing spans and fix bug with trailing whitespace
2015-04-21 20:40:36 +12:00
Nick Cameron
defcceb879
Pull out some functionality into separate files
2015-04-21 16:47:15 +12:00