Skip to content

Commit ccdef6f

Browse files
committed
Add rustfmt configuration file
Generate and add a default configuration file for `rustfmt` using rustfmt --print-config default rustfmt.toml This produces a config file that causes `rustfmt` to make no changes, as expected, when we run cargo +nightly fmt Please note, the config file includes unstable options which throw warnings if used without the nightly toolchain.
1 parent f7f6f3b commit ccdef6f

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

rustfmt.toml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
max_width = 100
2+
hard_tabs = false
3+
tab_spaces = 4
4+
newline_style = "Auto"
5+
indent_style = "Block"
6+
use_small_heuristics = "Default"
7+
fn_call_width = 60
8+
attr_fn_like_width = 70
9+
struct_lit_width = 18
10+
struct_variant_width = 35
11+
array_width = 60
12+
chain_width = 60
13+
single_line_if_else_max_width = 50
14+
wrap_comments = false
15+
format_code_in_doc_comments = false
16+
comment_width = 80
17+
normalize_comments = false
18+
normalize_doc_attributes = false
19+
license_template_path = ""
20+
format_strings = false
21+
format_macro_matchers = false
22+
format_macro_bodies = true
23+
hex_literal_case = "Preserve"
24+
empty_item_single_line = true
25+
struct_lit_single_line = true
26+
fn_single_line = false
27+
where_single_line = false
28+
imports_indent = "Block"
29+
imports_layout = "Mixed"
30+
imports_granularity = "Preserve"
31+
group_imports = "Preserve"
32+
reorder_imports = true
33+
reorder_modules = true
34+
reorder_impl_items = false
35+
type_punctuation_density = "Wide"
36+
space_before_colon = false
37+
space_after_colon = true
38+
spaces_around_ranges = false
39+
binop_separator = "Front"
40+
remove_nested_parens = true
41+
combine_control_expr = true
42+
overflow_delimited_expr = false
43+
struct_field_align_threshold = 0
44+
enum_discrim_align_threshold = 0
45+
match_arm_blocks = true
46+
match_arm_leading_pipes = "Never"
47+
force_multiline_blocks = false
48+
fn_args_layout = "Tall"
49+
brace_style = "SameLineWhere"
50+
control_brace_style = "AlwaysSameLine"
51+
trailing_semicolon = true
52+
trailing_comma = "Vertical"
53+
match_block_trailing_comma = false
54+
blank_lines_upper_bound = 1
55+
blank_lines_lower_bound = 0
56+
edition = "2015"
57+
version = "One"
58+
inline_attribute_width = 0
59+
format_generated_files = true
60+
merge_derives = true
61+
use_try_shorthand = false
62+
use_field_init_shorthand = false
63+
force_explicit_abi = true
64+
condense_wildcard_suffixes = false
65+
color = "Auto"
66+
required_version = "1.4.38"
67+
unstable_features = false
68+
disable_all_formatting = false
69+
skip_children = false
70+
hide_parse_errors = false
71+
error_on_line_overflow = false
72+
error_on_unformatted = false
73+
report_todo = "Never"
74+
report_fixme = "Never"
75+
ignore = []
76+
emit_mode = "Files"
77+
make_backup = false

0 commit comments

Comments
 (0)