google / google/google-java-format
When Javadoc formatting is disabled, don't change javadoc so much
- 主要語言
- Java
- 星號
- 6.2k
- 分支
- 936
- 平均合併
- 6 分鐘
- 30 天內合併 PR
- 3
描述
Javadoc formatting regularly gives undesired results and lags behind in its support for both Javadoc (esp. `{@snippet ...}`) and HTML (e.g. elements such as ``, ``, ``, ``, ... aren't properly supported, nor is wrapping a "block" with an `` element, etc.).
With `--skip-javadoc-formatting`, the result is unusable as well, because indentation is still removed.
So because of the poor Javadoc formatting, and the inability to disable it altogether, it's impractical to format my Java code with GJF.
I propose to at least provide an option to disable Javadoc formatting altogether (i.e. not even adding asterisks or doing any alignment/indentation changes). Either by updating the semantics of `--skip-javadoc-formatting`, or by introducing a new option (e.g. `--disable-javadoc-formatting`).
It would also be helpful to have an option where GJF only formats pure Javadoc (i.e. anything within `{@... }` and lines that start with a tag) and leaves anything else untouched (with an additional option to specify tags to exclude, such as `@snippet` while it's unsupported).
貢獻指南
研究方向
先追蹤現有的 --skip-javadoc-formatting 選項和 Javadoc 格式化路徑。將其目前的行為與要求的完全停用模式及提議的選擇性格式化選項進行比較;「done」應包含明確定義的選項語義,以便在停用格式化時保留 Javadoc 內容和縮排。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- tooling
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100