google / google/google-java-format
Java or Java-like files with alternate extensions are skipped.
- 主要語言
- Java
- 星號
- 6.2k
- 分支
- 937
- 平均合併
- 6 分鐘
- 30 天內合併 PR
- 3
描述
Main.java has a very simple path extension check.
```java
for (String fileName : parameters.files()) {
if (!fileName.endsWith(".java")) {
errWriter.println("Skipping non-Java file: " + fileName);
continue;
}
```
Is there any reason alternate file extensions can't be formatting/supported? You can somewhat get around this by using standard input formatting and --assume-filename, so you can get around this with some additional tooling, but the restriction on the extension seems to be more out of an abundance of caution for throwing mixed source directories and folder structures.
My original intention was to see how well GJF does on AIDL files which kicked of my investigation into my options.
貢獻指南
研究方向
從 Main.java 中 issue 所示的路徑副檔名檢查開始,檢視帶有 --assume-filename 的標準輸入目前如何處理替代名稱。確定對類似 Java 的副檔名所支援的行為,然後為選定的情況新增涵蓋範圍,並確認一般的非 Java 檔案仍會被略過。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- tooling
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100