Commit Graph

44 Commits

Author SHA1 Message Date
Yacin Tmimi
0cb294f05c Deprecate and Rename fn_args_layout -> fn_params_layout
fn_args_layout is now deprecated.

This option was renamed to better communicate that it affects the layout
of parameters in function signatures and not the layout of arguments in
function calls.

Because the `fn_args_layout` is a stable option the renamed option is
also stable, however users who set `fn_args_layout` will get a warning
message letting them know that the option has been renamed.
2022-07-12 19:33:53 -05:00
Caleb Cartwright
825561deb8 feat: remove report_fixme option 2022-05-30 08:56:09 -05:00
Caleb Cartwright
4c8db85939 feat: remove report_todo option 2022-05-30 08:56:09 -05:00
Stéphane Campinas
e6b60a40d5 stabilise fn_args_density (#3581) 2019-06-03 22:26:48 +09:00
Nick Cameron
4f522794ae Tidy up and pass tests 2018-03-02 15:07:13 +13:00
topecongiro
4af2aa3a9e Create rustfmt_core crate 2018-02-07 22:48:05 +09:00
Nick Cameron
86007e7d17 Remove where_density and where_layout options
There is a choice between block and visual indent for where clauses, plus the
single line option. I think these two are too fine-grained to be useful.
2017-11-24 21:08:24 +13:00
Nick Cameron
dd1fbca99a Replace various small width heuristics with a single option
Closes #1984
2017-11-24 20:17:06 +13:00
Nick Cameron
179b3c59de Remove legacy option fn_args_paren_newline 2017-11-24 13:27:14 +13:00
Nick Cameron
4f65124422 Remove legacy option fn_return_indent 2017-11-24 13:19:36 +13:00
Nick Cameron
d0f12b8ec8 Remove unused option take_source_hints 2017-11-24 13:08:02 +13:00
topecongiro
f8074b340d Combine fn_brace_style and item_brace_style 2017-11-14 10:47:02 +09:00
topecongiro
96f3c36c04 Replace '_indent' with 'indent_style' 2017-11-13 17:33:32 +09:00
topecongiro
40c5666af6 Rename 'struct_lit_style' to 'struct_lit_indent' 2017-11-04 22:47:28 +09:00
topecongiro
55c2000d94 Rename 'fn_args_layout' to 'fn_args_indent' 2017-11-04 22:45:47 +09:00
Nick Cameron
5d9a35050d Remove where_indent option 2017-05-01 16:05:38 +12:00
Nick Cameron
8bca85c4b6 Support block indent for function calls
Uses the `fn_call_style` option.

Fixes #1358
2017-03-28 10:43:46 +13:00
Nick Cameron
21ff1d43ba Unify a bunch of option types into IndentStyle 2017-03-20 11:46:39 +13:00
C4K3
ab832fa4bb config: Rename ideal_width -> comment_width (#1370)
Since the config option only affects comment widths, and the previous
name has led to some confusion (see #1321, #1152).
2017-03-13 09:07:33 +13:00
Nick Cameron
6a58d91239 Coalesce trailing comma options 2017-02-24 10:31:23 +13:00
Nick Cameron
a7612cc773 more fallout 2017-02-23 13:15:48 +13:00
Marcus Klaas
98c0570a28 Format non-statement if-else expressions on a single line 2016-05-29 17:58:38 +02: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
bc59f83f02 Use max width for function decls, etc.
We were using ideal width + leeway before. This means we can remove leeway from the config. We could remove ideal_width too, but I want to use it for comments.
2015-09-27 19:34:35 +13:00
Marcus Klaas
03c660633f Refine chain breaking heuristics
Don't make a single line chain when it is was multi line in the source; allow overflow of the last chain element onto the next lines without breaking the chain.
2015-09-11 00:53:01 +02:00
Nick Cameron
fae93abbda Support struct-like layouts for fn args 2015-09-02 09:41:08 +12:00
Nick Cameron
f81485d9d6 Rename fn_args_layout to fn_args_density 2015-09-02 08:56:37 +12:00
Nick Cameron
6ca2756a82 Merge pull request #238 from nrc/fn-decl
Customisation of function decls
2015-09-02 08:00:28 +12:00
Nick Cameron
8d81aa1991 Support where clauses on the same line as the function decl where it all fits on one line. 2015-09-02 07:59:54 +12:00
Sinh Pham
55fe34a00f Format strings option https://github.com/nrc/rustfmt/issues/202 2015-09-01 08:14:52 -04:00
Nick Cameron
6216dce14e Support where clause predicates at different indentations 2015-09-01 19:04:41 +12:00
Nick Cameron
02a01350ff Support where predicates on the same line 2015-09-01 18:53:16 +12:00
Nick Cameron
6f3c329500 Support non-indented where clauses 2015-09-01 18:38:12 +12:00
Nick Cameron
fc2fb8be43 Support different indent styles for generics 2015-09-01 18:20:17 +12:00
Nick Cameron
0413c47a09 Support different tabbing of function args
(Although, frankly anything other than visual is deeply wrong).
2015-09-01 17:22:00 +12:00
Nick Cameron
89cda8d43a Option to pack fn args on fewer lines 2015-09-01 17:06:41 +12:00
Marcus Klaas
b7a71250f4 Implement single line if-else formatting 2015-08-25 22:09:46 +02:00
Marcus Klaas
5fcd313b08 Format closures 2015-08-19 23:15:56 +02:00
Marcus Klaas
c4101de53d Refactor some things; add extra tests. 2015-07-24 19:00:14 +02:00
Nick Cameron
7518f68861 Add an option to format struct lits with either block or visual indent 2015-07-16 14:05:05 +12:00
Marcus Klaas
482f200b0b Update import list formatting
Include comments and sort items alphabetically.
2015-06-26 03:43:12 +02:00
Marcus Klaas
0ef5db9496 Format tuple-like structs 2015-06-23 16:54:42 +02:00
Marcus Klaas
d335d04575 Implement checks for unnumbered TODOs and FIXMEs 2015-06-12 20:58:23 +02:00
Marcus Klaas
98c9c6e9ef implement framework for system tests 2015-06-05 17:50:22 +02:00