google / google/google-java-format

Should the formatter also add missing braces

Offen
#51 9 Kommentare 26 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
non-whitespace
Vorherrschende Sprache
Java
Sterne
6.2k
Forks
937
Ø Merge
6 Min.
Gemergte PRs (30 T.)
3

Beschreibung

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
}
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.