Skip to content

Change default value for blank_lines_upper_bound from 1 to 5 #4087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## [Unreleased]

### Changed
- Change the default value for `blank_lines_upper_bound` from 1 to 5.

## [1.4.9] 2019-10-07

### Changed
Expand All @@ -13,7 +16,7 @@
- Fix aligning comments of different group
- Fix flattening imports with a single `self`.
- Fix removing attributes on function parameters.
- Fix removing `impl` keyword from opaque type.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My editor removed some trailing whitespace in this file. If I should remove those stray changes, just tell me.

- Fix removing `impl` keyword from opaque type.

## [1.4.8] 2019-09-08

Expand Down Expand Up @@ -45,7 +48,7 @@

- Add `--message-format` command line option to `cargo-fmt`.
- Add `-l,--files-with-diff` command line option to `rustfmt`.
- Add `json` emit mode.
- Add `json` emit mode.

### Fixed

Expand Down Expand Up @@ -96,7 +99,7 @@

### Added

- Add new attribute `rustfmt::skip::attributes` to prevent rustfmt
- Add new attribute `rustfmt::skip::attributes` to prevent rustfmt
from formatting an attribute #3665

### Changed
Expand Down
4 changes: 2 additions & 2 deletions Configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ fn bar() {
Maximum number of blank lines which can be put between items. If more than this number of consecutive empty
lines are found, they are trimmed down to match this integer.

- **Default value**: `1`
- **Default value**: `5`
- **Possible values**: any non-negative integer
- **Stable**: No (tracking issue: #3381)

Expand All @@ -127,7 +127,7 @@ fn bar() {
}
```

#### `1` (default):
#### `1`:
```rust
fn foo() {
println!("a");
Expand Down
4 changes: 2 additions & 2 deletions rustfmt-core/rustfmt-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ create_config! {
"How to handle trailing commas for lists";
match_block_trailing_comma: bool, false, false,
"Put a trailing comma after a block based match arm (non-block arms are not affected)";
blank_lines_upper_bound: usize, 1, false,
blank_lines_upper_bound: usize, 5, false,
"Maximum number of blank lines which can be put between items";
blank_lines_lower_bound: usize, 0, false,
"Minimum number of blank lines which must be put between items";
Expand Down Expand Up @@ -529,7 +529,7 @@ control_brace_style = "AlwaysSameLine"
trailing_semicolon = true
trailing_comma = "Vertical"
match_block_trailing_comma = false
blank_lines_upper_bound = 1
blank_lines_upper_bound = 5
blank_lines_lower_bound = 0
edition = "2018"
version = "One"
Expand Down