[SERVER-19142] clang-format should allow discretion in blank lines at the start of blocks Created: 25/Jun/15  Updated: 14/Jul/16  Resolved: 01/Jun/16

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 3.1.5
Fix Version/s: 3.3.8

Type: Bug Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Mark Benvenuto
Resolution: Done Votes: 1
Labels: clang-format
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-19192 clang-format should put newlines afte... Closed
Related
related to SERVER-23971 Update .clang-format rules for Clang-... Closed
is related to SERVER-19159 Clang-format should put a newline aft... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 15 (06/03/16)
Participants:

 Description   

The current Clang-Format does not allow users to choose how they many blank lines after a new block to leave. It strips all blank lines.

This is controlled by KeepEmptyLinesAtTheStartOfBlocks.

Users would like to be able to write something like this

void foo() {
 
    // do nothing
}

or

if (true) {
 
    // do nothing
}

Today, both look like this

if (true) {
    // do nothing
}


Generated at Thu Feb 08 03:49:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.