[clang-format]: `SeparateDefinitionBlocks` doesn't respect `MaxEmptyLinesToKeep`
Open
clang-format
confirmed
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
I have the following .clang-format config:
```
SeparateDefinitionBlocks: Always
MaxEmptyLinesToKeep: 2
```
The following C++ code:
```C++
struct A {};
struct B {};
```
Is formatted as:
```C++
struct A {};
struct B {};
```
Which is not what I intended or expected it to be formatted like with this config. I expected this code to be left as is, and obviously if there was no empty lines between A and B struct definitions, I would expect one empty line to be added between them, but not two empty lines to be collapsed into one empty line, given that I have `MaxEmptyLinesToKeep` set to `2`.
Contributor guide
Assessment
This issue has not been assessed yet.