Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Allow spotless greclipse.properties to be selected via configuration

オープン
#901 コメント 1 件 リアクション 3 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

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

調査の方向性

まず、testlib/src/main/resources/groovy/greclipse/format/greclipse.properties と greclipse formatter の設定エントリーポイントを調べます。参照されている Spotless のプロパティと、issue で改訂された設定を比較し、名前付き設定を選択する方法を明らかにします。プロジェクトが properties ファイルをコピーせずに設定を選択でき、結果のフォーマットがドキュメント化された設定と一致すれば完了です。

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

説明

enhancement

The default formatting configuration of greclipse isn't very standard or desirable. However, spotless configures greclipse.properties in a much more standard way.

For example, compare the default formatting of googleJavaFormat to greclipse. They're very different.

If you Google site:github.com "greclipse.properties", you will find that many projects simply copied this file as defined by spotless.

Instead of having to copy greclipse.properties into every project, it'd be sweet if we could just select this formatting configuration by spotless via configuration, for example:

<greclipse>
  <formatterConfiguration>spotless</file> <!-- default value: eclipse? -->
</greclipse>

EDIT:
Unfortunately, I spoke too soon. I didn't realize spotless's greclipse.properties sets the following (I assume for testing):

groovy.formatter.braces.start=next
groovy.formatter.braces.end=same

These settings aren't very typical. I propose the following settings to stay consistent with googleJavaFormat as well as with examples on the Groovy style guide:

groovy.formatter.braces.end=next
groovy.formatter.braces.start=same
groovy.formatter.longListLength=100
groovy.formatter.multiline.indentation=4
groovy.formatter.remove.unnecessary.semicolons=true
org.eclipse.jdt.core.formatter.indent_empty_lines=false
org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=2
主要言語
Java
スター
5.7k
フォーク
560
平均マージ
1日 6時間
マージ済み PR(30日)
49

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

diffplug/spotless のほかの issue

diffplug/spotless の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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