google / google/google-java-format

Remove unneeded static imports

Đang mở
#844 2 bình luận 2 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ả

google-java-format removes some but not all unneeded import statements.
I suggest that it should remove more unneeded static imports.

As an example, in Error Prone file `ASTHelpers.java`, consider [the line](https://github.com/google/error-prone/blob/1c38087e16210e1a4b739cb6a21565fc283e8532/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java#L27)

```java
import static com.google.errorprone.util.ASTHelpers.isStatic;
```

This is unnecessary because it is statically importing a method defined in the same file.

It would be nice if google-java-format removed the line.

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.