Commit Graph

249 Commits

Author SHA1 Message Date
Yacin Tmimi
fe8b72d98e implement single_line_let_else_max_width
This allows users to configure the maximum length of a single line
`let-else` statements. `let-else` statements that otherwise meet the
requirements to be formatted on a single line will have their divergent
`else` block formatted over multiple lines if they exceed this length.

**Note**: `single_line_let_else_max_widt` will be introduced as a stable
configuration option.
2023-07-01 01:06:35 -05:00
Arthur Carcano
567bd97723
Document which comments are excluded from wrapping (#5637)
* Document which comments are excluded from wrapping

Cf: https://github.com/rust-lang/rustfmt/issues/5634

* Add examples in wrap_commments doc

* fix failling tests
2023-01-28 15:16:46 -06:00
Alex Touchet
ee2bed96d6 Fix spacing 2022-11-08 15:13:47 -06:00
Caleb Cartwright
ef91154250
docs: expand behavior of imports_granularity re: groups (#5543) 2022-09-19 17:58:37 -05:00
aizpurua23a
7432422008 Update Configurations.md to point to dirs 4.0 docs 2022-07-27 13:33:50 -04:00
waynewaynetsai
dde28314da docs: fix duplicated names example 2022-07-17 13:27:44 -04:00
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
Tom Milligan
c240f3a6b3
feat: add skip_macro_invocations option (#5347)
* feat: add skip_macro_names option

* [review] update configuration documentation

* [review] fix docstring

* [feat] implement wildcard macro invocation skip

* commit missed files

* [review] test override skip macro names

* [review] skip_macro_names -> skip_macro_invocations

* [review] expand doc configuration

* [review] add lots more tests

* [review] add use alias test examples

* [review] add link to standard macro behaviour
2022-07-12 19:31:19 -05:00
sec65
33c60740d3
Add width for codeblocks in comments (#5372)
* add doc_comment_code_block_width configuration

* updated config docu

* Updated docu and changed tests to config folder
2022-06-16 22:15:16 -05:00
Caleb Cartwright
79515f17ed feat: remove license_template_path config option 2022-05-30 08:56:09 -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
Caleb Cartwright
3e38399ed8 docs: clarify imports_granularity behavior with comments 2022-05-26 22:27:20 -05:00
Alexander Pozdneev
37b48ca4b2 Update Configurations.md
Co-authored-by: Yacin Tmimi <yacintmimi@gmail.com>
2022-05-23 09:52:20 -04:00
Alexander Pozdneev
0b6659cf02 Update Configurations.md 2022-05-23 09:52:20 -04:00
Josh Triplett
17003ce66b In the docs for hex_literal_case, show the default as a possible value 2022-05-09 19:45:02 -05:00
Tom Milligan
4f3f87fb9a group_imports: test and document non-consecutive imports 2022-04-11 17:46:33 -05:00
123vivekr
0dba01aee1 Add short_item_threshold config option
Allow custom short item threshold values via config
2022-03-21 16:56:09 -05:00
Yacin Tmimi
9c65db61be Correct tracking issue link for skip_children
Update the issue link to point to issue 3389
2022-03-15 21:40:20 -05:00
Stepan Koltsov
813d127c82 Clarify generated marker requires a config option 2022-02-10 22:18:32 -06:00
Caleb Cartwright
bfbf42cecb fix(rustfmt): resolve generated file formatting issue 2022-01-14 18:18:37 -06:00
Caleb Cartwright
0167c5303f Merge commit '8da837185714cefbb261e93e9846afb11c1dc60e' into sync-rustfmt-subtree 2021-12-02 21:35:30 -06:00
Caleb Cartwright
f99e3582bd Merge commit 'ea199bacef07213dbe008841b89c450e3bf0c638' into rustfmt-sync 2021-11-07 20:37:34 -06:00
Caleb Cartwright
2b41b6d022 Merge commit 'efa8f5521d3813cc897ba29ea0ef98c7aef66bb6' into rustfmt-subtree 2021-10-20 00:11:59 -05:00
Caleb Cartwright
e4b8714c09 Merge commit '4236289b75ee55c78538c749512cdbeea5e1c332' into update-rustfmt 2021-07-25 22:57:19 -05:00
Alexander Melentyev
71f01d1974 Delete spaces 2021-06-21 12:11:37 +03:00
Caleb Cartwright
0269eb1c5f docs: update configuration info 2021-04-21 21:27:50 -05:00
Michael Morgan
384ba68d64 Add imports_granularity="Item".
This option splits all imports into their own `use` statement.
2021-01-27 20:58:42 -06:00
Geoffry Song
17bad2b3c0 Tweak imports_granularity documentation 2021-01-17 11:48:47 -06:00
Geoffry Song
71863753bd Rename merge_imports to imports_granularity and add a Module option.
This renames the existing `true`/`false` options to `Crate`/`Never`, then adds a
new `Module` option which causes imports to be grouped together by their
originating module.
2021-01-17 11:48:47 -06:00
Mara Bos
398d2f96c3 Add support for edition 2021. 2021-01-09 12:11:52 -06:00
Matt
073cc3891f Option to create groups for std, external crates, and other imports
Backport of 17d90ca.
2020-11-18 21:37:42 -06:00
Caleb Cartwright
f6b96254fb docs: add config info for match_arm_leading_pipes 2020-09-24 09:43:31 -05:00
Caleb Cartwright
62432fe31b add new flag to list names of misformatted files (#3747) 2019-08-19 11:04:40 +09:00
Cliff Dyer
127de25041 sorted configuration docs (#3723) 2019-08-06 11:07:12 +09:00
Caleb Cartwright
1ee51a4125 Add support for windows-style paths in ignore patterns (#3633) 2019-06-29 15:51:27 +09:00
Stéphane Campinas
e6b60a40d5 stabilise fn_args_density (#3581) 2019-06-03 22:26:48 +09:00
Seiichi Uchida
e0664662b4
Update the documentation of ignore (#3580) 2019-05-23 09:43:43 +09:00
xiongmao86
a956a20532 Revert "Revert "Change config option from format_doc_comments to format_code_in_doc_comments.""
This reverts commit 97d7216cd4.
2019-05-10 21:22:52 +08:00
xiongmao86
de425f1eb8 Fix docs in Configurations.md. 2019-05-08 16:56:53 +08:00
xiongmao86
97d7216cd4 Revert "Change config option from format_doc_comments to format_code_in_doc_comments."
This reverts commit 6a6924c12b.
2019-05-08 16:51:32 +08:00
xiongmao86
6a6924c12b Change config option from format_doc_comments to format_code_in_doc_comments. 2019-05-06 19:45:34 +08:00
daxpedda
cfd1811a24
Additional info to default value of edition. 2019-03-13 15:46:34 +01:00
Stéphane Campinas
6a75feedac
Merge pull request #3409 from rchaser53/issue-3343
add config inline_attribute_width
2019-02-23 13:16:23 +01:00
rchaser53
e68044f8bc add a section to Configuration.md
- attributes => attribute
2019-02-23 13:46:32 +09:00
Ben Boeckel
2a353429b6 Configurations: fix typos and mismatches 2019-02-22 14:09:15 -05:00
Stéphane Campinas
2b08b73f56
do not put tracking issue as part of the option's title 2019-02-18 20:35:22 +01:00
Stéphane Campinas
412dcc70a2
point unstable options to tracking issues 2019-02-14 00:11:25 +01:00
Seiichi Uchida
efd6fda43f
Merge pull request #3311 from rchaser53/issue-3295
fix "internal error: left behind trailing whitespace" with long lines
2019-02-04 00:10:42 +09:00
rchaser53
c2534f5324 fix "internal error: left behind trailing whitespace" with long lines 2019-02-01 19:58:38 +09:00