google / google/google-java-format

Inconsistent treatment of **/ at end of Javadoc

未關閉
#67 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Java
星號
6.2k
分支
937
平均合併
6 分鐘
30 天內合併 PR
3

描述

After formatting, this:

```
public class DoubleTrailingAsterisk {

/**
* Here is a multi-line comment that ends with a double asterisk.
**/
public void m1() {}

/** Here is a single-line comment that ends with a double asterisk. **/
public void m2() {}
}
```

becomes this:

```
public class DoubleTrailingAsterisk {

/** Here is a multi-line comment that ends with a double asterisk. */
public void m1() {}

/** Here is a single-line comment that ends with a double asterisk. * */
public void m2() {}
}
```

where the second Javadoc comment contains an extra "*".

貢獻指南

開啟貢獻指南

研究方向

Reproduce the issue with the two Javadoc examples in the report and compare the formatted output. Trace the formatter's Javadoc-comment handling, then add a regression test showing that a single-line comment ending in **/ does not gain an extra asterisk; the existing examples should format consistently.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
tooling
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
描述清楚
新手友好度
50/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。