Use java source version for Google Format checks
- 主要言語
- 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