Nick Cameron
e6800bf27d
remove closure_block_indent_threshold option
2017-11-13 15:40:54 +13:00
topecongiro
b023cc831c
Remove static lifetime
2017-11-06 13:52:25 +09:00
topecongiro
fc4a51a242
Prefer println!() to println!("")
2017-11-06 13:52:25 +09:00
Afshin Mehrabani
f412c875ea
Adding where_single_line option ( #2030 )
...
* feat(where): adding where_single_line option and tests
* fix(where): adding more tests
* feat(where): changing the shape of where clause when where_single_line is true
* feat: newline_for_brace should avoid adding a new line where where_single_line is true
* fix(items): where_single_line should bypass the multi-item where clauses
* fix(items): refactoring and removing redundant variables
* fix(items): where_single_line should not be functional when args are multilined
* fix(config): fixing conflict with upstream
2017-11-06 11:53:17 +13:00
Nick Cameron
f1035d9782
Merge pull request #2116 from topecongiro/config-options-indent
...
Rename config options related to indent
2017-11-06 08:43:12 +13:00
topecongiro
40c5666af6
Rename 'struct_lit_style' to 'struct_lit_indent'
2017-11-04 22:47:28 +09:00
topecongiro
d5d8740993
Rename 'fn_call_style' to 'fn_call_indent'
2017-11-04 22:46:40 +09:00
topecongiro
55c2000d94
Rename 'fn_args_layout' to 'fn_args_indent'
2017-11-04 22:45:47 +09:00
topecongiro
5096cdff56
Rename 'array_layout' to 'array_indent'
2017-11-04 22:45:09 +09:00
topecongiro
d287b06eba
Rename 'chain_one_line_max' to 'chain_width'
2017-11-04 22:24:43 +09:00
Nick Cameron
9bf81f9d12
Remove LicensePolicy (dead code)
...
Fixes #1320
2017-11-03 08:43:33 +13:00
Martin Lindhe
f930a16b8d
fix some typos
2017-11-01 07:33:55 +01:00
Tarin Mahmood
685c9d332f
Unstable options added
2017-10-28 16:26:33 +06:00
Ömer Sinan Ağacan
abf8f43233
Implement match_arm_forces_newline option ( #2039 )
2017-10-26 20:20:36 +03:00
Douglas Anderson
ac33472d36
Fix typo in --config-help "funciton" -> "function"
2017-10-22 00:47:45 -06:00
Jorge Aparicio
77584e507c
default required-version to the current rustfmt version
2017-10-10 22:37:47 +02:00
Jorge Aparicio
0c36c59175
add required-version
option to rustfmt.toml
...
This option specifies the rustfmt version that *must* be used to format the code. Trying to use a
different version raises an error.
closes #1505
2017-10-09 23:07:53 +02:00
topecongiro
d55b3492c0
Rename binop_sep to binop_separator
2017-09-15 15:05:41 +09:00
topecongiro
45e48ec424
Add a new config option to control the placement of a binary operator
2017-09-15 12:10:30 +09:00
Seiichi Uchida
9d49bd22f0
Add explicit lifetime
2017-08-31 13:24:32 +09:00
Seiichi Uchida
4b79055a15
Apply refactoring from cargo clippy
2017-08-31 12:49:12 +09:00
topecongiro
5dafcc24e4
Add merge_derives config option
2017-08-24 22:29:56 +09:00
Michael Smith
411c73c12f
Add multiline_{closure,match_arm}_forces_block
...
multiline_closure_forces_block = false (default):
result.and_then(|maybe_value| match maybe_value {
None => ...,
Some(value) => ...,
})
multiline_closure_forces_block = true:
result.and_then(|maybe_value| {
match maybe_value {
None => ...,
Some(value) => ...,
}
})
multiline_match_arm_forces_block = false (default):
match lorem {
None => if ipsum {
println!("Hello World");
},
Some(dolor) => ...,
}
multiline_match_arm_forces_block = true:
match lorem {
None => {
if ipsum {
println!("Hello World");
}
}
Some(dolor) => ...,
}
2017-08-21 14:05:20 -07:00
Nick Cameron
7e171836c6
Merge pull request #1900 from spinda/attributes-on-same-line
...
Add attributes_on_same_line_as_{field,variant} configs
2017-08-21 11:26:36 +12:00
Michael Smith
1c9d044c05
Add attributes_on_same_line_as_{field,variant}
2017-08-19 15:09:10 -07:00
Seiichi Uchida
a3567cec94
Add mach_pattern_separator_break_point config option
2017-08-18 23:19:11 +09:00
sinkuu
b433e63d2a
Remove unnecessary blank lines at the start and the end of a block
2017-08-11 17:44:16 +09:00
topecongiro
e69a2aba18
Add error_on_line_overflow_comments config option
2017-08-10 08:13:20 +09:00
topecongiro
7bf9aa25be
Add reorder_extern_crates and reorder_extern_crates_in_group config options
2017-08-09 00:16:18 +09:00
Seiichi Uchida
6ab727e6ff
Set where_density default value to Density::Vertical
2017-08-01 22:27:12 +09:00
Nick Cameron
6984c05e69
Change the writemode to overwrite
2017-07-21 11:22:51 +12:00
topecongiro
988e387132
Add imports_indent and imports_layout config options
2017-07-14 09:18:28 +09:00
topecongiro
d9dc13efe1
Set reorder_imported_names to true as default
2017-07-13 18:42:49 +09:00
topecongiro
6fd291981e
Sort imports in alphabetical and consistent order
2017-07-13 18:42:14 +09:00
topecongiro
2fb66cd1d3
Add trailing_semicolon config option
...
trailing_semicolon controls whether to add a trailing semicolon after break,
continue and return.
2017-07-12 14:16:06 +09:00
topecongiro
c11aac04a3
Update wrap_match_arms option tests and visual guide
2017-07-11 21:53:57 +09:00
topecongiro
e3310a6a18
Format source codes
2017-07-11 21:53:10 +09:00
Seiichi Uchida
bc63d69c3f
Format source codes
2017-07-10 02:24:59 +09:00
topecongiro
8e8e7a4215
Add array_horizontal_layout_threshold option
2017-07-06 01:19:36 +09:00
topecongiro
34b4a9d3c4
Add struct_field_align_threshold for vertical alignment
2017-07-03 18:54:41 +09:00
Nick Cameron
85ecaf99df
Config knows if an option was default or set
2017-06-16 16:49:54 +12:00
Nick Cameron
1f512948a0
Reformat source code using new defaults
2017-06-13 14:41:49 +12:00
Nick Cameron
32e882789b
Change defaults to RFC style
2017-06-13 14:37:04 +12:00
Nick Cameron
6a9d7dab0d
Merge pull request #1637 from est31/master
...
Add config options for spaces around the colon in struct literal fields
2017-06-06 16:20:16 +12:00
est31
aa4cd311bb
Add config options for spaces around the colon in struct literal fields
...
In Rust, colons are used for three purposes:
* Type annotations, including type ascription
* Trait bounds
* Struct literal fields
This commit adds options for the last missing of the three purposes,
struct literal fields.
2017-06-06 03:50:58 +02:00
topecongiro
41b7cc6a73
Set combine_control_expr to false by default and true in rfc-rustfmt
2017-06-05 15:31:44 +09:00
topecongiro
4a0094f28f
Add combine_control_expr option
2017-06-04 19:35:29 +09:00
Nick Cameron
cdc3f9321c
Rename the Style::Default option to Legacy
2017-06-02 11:44:38 +12:00
Ravi Khadiwala
3d0ea5a099
Fix typo in from_toml_path
2017-05-30 22:25:24 -05:00
Ravi Khadiwala
17995e1539
Expose methods to locate and load config
...
* Make method for searching parents for toml file public
* Make method for loading config from path directly public, tweak the
API since it was never returning None
2017-05-30 21:41:30 -05:00