diffplug / diffplug/spotless

Use java source version for Google Format checks

オープン
#1,841 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Java
スター
5.6k
フォーク
559
平均マージ
1日 14時間
マージ済み PR(30日)
43

説明

Several spotless check actually use `google-java-format` under the hoods. When those checks are run from a JDK 17 environment but files are actually targeting Java 8 or Java 11, and also contains some reserved identifiers like `yield`, those checks would fail because files cannot be parsed (not because they are not conformant).

In general checks should use the version of the language used to compile those files, not the one used to run the plugin, so adding an option to either detect the version or allow the user to specify it would solve the issue.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

google-java-format を呼び出す Spotless のチェックから始め、JDK 17 で実行したときに Java ソースバージョンがどのように選択されるかを追跡します。それをファイルのコンパイルに使用されるバージョンと比較します。完了の条件は、yield などの予約識別子を含む Java 8 または Java 11 のターゲットを、プラグインのランタイムバージョンに依存せず、検出またはユーザー指定のオプションによってパースできることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
build-system, tooling
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。