google / google/google-java-format

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

Đang mở
#164 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
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

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.