dslx_fmt should not insert blank line before comments between functions
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
**Describe the bug**
Not sure if that's intentional, but it seems that dslx_fmt systematically insert a blank line on a comment that appear between two functions.
**To Reproduce**
```
fn foo() -> u32 {
let a = 0;
a
}
// foo
#[test]
fn foo_test() {
let x = foo();
assert_eq(x, u32:0);
}
```
gets reformatted as:
```
fn foo() -> u32 {
let a = 0;
a
}
// foo
#[test]
fn foo_test() {
let x = foo();
assert_eq(x, u32:0);
}
```
**Expected behavior**
dslx_fmt doesn't insert a blank line before the comment.
**Additional context**
Note that this doesn't happen if the function is last in the file:
```
fn foo() -> u32 {
let a = 0;
a
}
// foo
```
Contributor guide
Assessment
This issue has not been assessed yet.