google / google/google-java-format
Unclear error messages for invisible whitespace
- 主要語言
- Java
- 星號
- 6.2k
- 分支
- 937
- 平均合併
- 6 分鐘
- 30 天內合併 PR
- 3
描述
The following program with a zero width space after the `println` is executable but cannot not be formatted
```
public class Main {
public static void main(String[] args) {
System.out.println("hello");
}
}
```
```
% java -version
openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment Zulu19.30+11-CA (build 19.0.1+10)
OpenJDK 64-Bit Server VM Zulu19.30+11-CA (build 19.0.1+10, mixed mode, sharing)
% javac Main.java
% java Main
hello
% google-java-format --version
google-java-format: Version 1.17.0
% google-java-format Main.java
Main.java:3:10: error: expected token: 'println'; generated println instead
```
貢獻指南
研究方向
使用 google-java-format 1.17.0 執行提供的 Main.java 重現程式,並檢查 formatter 針對 println 後零寬度空白的剖析與診斷路徑。完成的標準是 formatter 回報一個容易理解的錯誤,指出不可見字元或其位置,並為此重現程式提供 coverage。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- tooling
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100