google / google/google-java-format
Remove unneeded static imports
- 主要語言
- Java
- 星號
- 6.2k
- 分支
- 937
- 平均合併
- 6 分鐘
- 30 天內合併 PR
- 3
描述
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.
貢獻指南
研究方向
從引用的 ASTHelpers.java import 開始,追蹤 google-java-format 如何識別並移除未使用的靜態 import。執行格式化器現有的 import 格式檢查,然後確認同一檔案中的靜態 import(例如 ASTHelpers.isStatic)會被移除,同時不會改變其他 import 的行為。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- tooling
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100