Commit Graph

93 Commits

Author SHA1 Message Date
Igor Matuszewski
9d52940dbe Run cargo fmt 2018-08-14 23:23:00 +02:00
Igor Matuszewski
38361c05bc Make file_lines_to_json test deterministic 2018-08-14 23:22:09 +02:00
Igor Matuszewski
4604f46ce8 Expose FileLines JSON representation 2018-08-14 13:33:58 +02:00
Aaron Loucks
dab572e0b0 Increase capacity for newline conversion buffer 2018-07-30 23:19:46 -04:00
Aaron Loucks
6ff2a5e0f3 Auto-detect newline style by default 2018-07-29 10:12:31 -04:00
Nick Cameron
481e85cc58 formatting 2018-07-24 15:46:39 +12:00
Nick Cameron
069c4fc508 Refactoring: summary
Move the timer from Summary to Session.

Move Summary from config to formatting.
2018-07-24 08:43:30 +12:00
Nick Cameron
90c5792565 Set rustfmt-format_macro_matchers to false by default
cc #2543
2018-07-18 12:09:50 +12:00
Nick Cameron
79c5ee8b42 Add config options for formatting macro matchers and bodies
Closes #2753
2018-07-18 12:03:59 +12:00
Michael Bebenita
c2ae39e77a Add max_width option for all heuristics.
This is useful when working with very small max_widths like 79 chars.
2018-07-17 13:17:36 -04:00
Nick Cameron
d911b640d1
Merge pull request #2823 from fwalch/default-newline-style
Change default newline style to "Native"
2018-07-17 11:18:10 +12:00
Seiichi Uchida
60ce411b53 Format async closure 2018-07-09 23:20:53 +09:00
Florian Walch
9d8f3812cc Change default newline style to "Native"
Fixes #2626.
2018-07-02 23:16:17 +02:00
Stéphane Campinas
f7a25a1177
warn on use of default value for an option 2018-06-30 17:03:18 +02:00
Nick Cameron
1ead31ae9d
Merge pull request #2795 from jechase/issue-2794
Add test and fix for #2794
2018-06-20 10:35:16 +12:00
Josh Chase
2077855e00 Remove NestedImport tactic 2018-06-19 12:13:26 -04:00
Nick Cameron
261238ea51 Change use_small_heuristics to an enum and stabilise
Since it is now an enum, we can be future compatible since we can add variants
for different heuristics.

Closes #1974
2018-06-19 13:28:27 +12:00
Seiichi Uchida
d1477ca1de Add a field in Summary for notiyfing about formatting failure of macro 2018-06-07 12:32:58 +09:00
Seiichi Uchida
42ab258757 Put each nested import on its own line
while putting non-nested imports on the same line as much as possible.
2018-06-05 19:58:44 +09:00
Nick Cameron
d930617cbe Make Range public
0.8.1
2018-05-28 11:30:58 +12:00
Tibo
33a46581f7
Fix test failing on windows due to crlf 2018-05-27 03:20:02 +10:00
Nick Cameron
632fab4c95 documentation 2018-05-21 15:54:56 +12:00
Nick Cameron
6541be3c6f Replace use_colored_tty with iatty crate 2018-05-21 15:32:27 +12:00
Nick Cameron
95d6b64829 Replace WriteMode with EmitMode and backup bool 2018-05-21 14:14:09 +12:00
Nick Cameron
843c12601a Use our own FileName struct rather than exporting libsyntax's 2018-05-21 12:08:39 +12:00
Nick Cameron
539d4d9665 Refactor CliOptions 2018-05-21 11:27:25 +12:00
Nick Cameron
abb253df8b Rationalise result and error types 2018-05-21 08:58:53 +12:00
Nick Cameron
432b1cb253 Rationalise error types
cc #2639
2018-05-21 08:58:53 +12:00
Nick Cameron
2ee8b0e4c5 Remove remove_blank_lines_at_start_or_end_of_block
cc #1974
2018-05-18 16:56:55 +12:00
Nick Cameron
dd9c15ad01 Unstabilise unstable_features
cc #1974
2018-05-18 16:53:08 +12:00
Nick Cameron
a70f71610c stabilise remove_nested_parens and set default to true 2018-05-18 16:46:22 +12:00
Nick Cameron
8afe367510 stabilise shorthand options
cc #1974
2018-05-18 16:38:09 +12:00
Nick Cameron
d726492e65 Remove spaces_within_parens_and_brackets
cc #1974
2018-05-18 16:35:09 +12:00
Nick Cameron
7b6d2b4699 Stabilise reorder_imports and reorder_modules 2018-05-18 16:04:09 +12:00
Nick Cameron
416bc4c353 Unstabilise comments options
cc #1974
2018-05-18 16:02:05 +12:00
Nick Cameron
1452349966 Exit with 1 for license check in --check mode
Closes #2707
2018-05-18 15:30:32 +12:00
Nick Cameron
a3c85cdc41 Reorder the --help message 2018-05-14 11:07:54 +12:00
Nick Cameron
6d0695303a Make some write modes unstable 2018-05-14 10:55:16 +12:00
Nick Cameron
3b23a98d00 Support unstable options
cc #1976
2018-05-14 10:20:51 +12:00
Nick Cameron
5d9f5aa05a Replace --write-mode with --emit
cc #1976
2018-05-13 14:13:24 +12:00
Nick Cameron
8396da1882 Add --backup flag 2018-05-13 13:18:08 +12:00
Nick Cameron
4d9de48e06 Add --check flag.
cc #1976
2018-05-11 20:26:00 +12:00
Nick Cameron
1869888b1a Remove --verbose-diff
Use `--verbose` instead

cc #1976
2018-05-11 13:58:34 +12:00
Nick Cameron
55ac062da0 Add --quiet flag, remove Plain write mode
cc #1976
2018-05-11 13:50:30 +12:00
topecongiro
bd25c7d0f7 Cargo fmt 2018-05-08 06:25:48 +09:00
Nick Cameron
4bbd5c4ae5
Merge pull request #2681 from topecongiro/issue-2680
Error on self_tests when there are lines that exceed max width
2018-05-07 11:20:33 +12:00
topecongiro
51c07f4335 Fix up lines exceeding max width 2018-05-06 16:17:09 +09:00
topecongiro
5f05987211 Use rustfmt.toml when running self_tests 2018-05-06 16:16:58 +09:00
topecongiro
1f738ea208 Cargo fmt 2018-05-06 15:22:29 +09:00
Nick Cameron
17b04f181d
Merge pull request #2677 from csmoe/remove_nested_parens_opt
Add remove nested parens option
2018-05-06 14:01:17 +12:00