google / google/google-java-format

Incorrect formatting of then clause when there is a comment on the line with `if`

Abierto
#164 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
6.2k
Forks
937
Merge medio
6 min
PR fusionados (30 d)
3

Descripción

Consider the following code, which has been formatted with google-java-format:

```java
public class CommentedTest {

public boolean comparableOrSuperclassEitherWay(ProglangType other) {
if (this == other) // ProglangType objects are interned
return true;

if (((this.base == BASE_OBJECT) && other.baseIsObject()) // interned strings
|| ((other.base == BASE_OBJECT) && baseIsObject())) // interned strings
return true;

return false;
}
}
```

The two `return true;` lines ought to be indented, but they are not.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.