google / google/google-java-format

Should the formatter also add missing braces

Open
#51 9 comments 26 reactions 0 assignees View on GitHub
non-whitespace
Dominant language
Java
Stars
6.2k
Forks
937
Avg merge
6m
Merged PRs (30d)
3

Description

To correct any violation of https://google.github.io/styleguide/javaguide.html#s4.1.1-braces-always-used

Currently it looks like a code that is formatted like

``` java
if (condition)
do_something
```

would be formatted (after running the tool) as:

``` java
if (condition) do_someting
```

where as I would expect it to be formatted as:

``` java
if (condition) {
do_something
}
```

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.