google / google/google-java-format
Incorrect formatting of then clause when there is a comment on the line with `if`
Đang mở
- Ngôn ngữ chính
- Java
- Star
- 6.2k
- Fork
- 937
- Merge trung bình
- 6 phút
- Pull request đã merge (30 ngày)
- 3
Mô tả
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.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.