google / google/xls

DSLX formatting is weird for empty statement blocks

Open
#1,703 0 comments 0 reactions 0 assignees View on GitHub
dslx dslx:fmt fmt:whitespace
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

**Describe the bug**
The following is produced by our formatter:

```
proc A {
config() { }

init { }

next(_: ()) { }
}
```

**To Reproduce**
If the above is in a file pointed to by `$TESTFILE`, run `xls/dslx/dslx_fmt $TESTFILE`.

**Expected behavior**
Ideally, you'd get `config() {}` or even just one space.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.