spotlessApply --staged
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- git, java
- 領域
- build-system, tooling
調査の方向性
まず、issue #178 からリンクされている staged ファイル用の hook スクリプトを読み、Spotless の既存の git 統合を調査します。アプローチを選ぶ前に、#603 と #600 をめぐる議論を確認します。未 staged の working-tree の内容を変更せずにフォーマットのチェックまたは適用を行う staged モードを提供できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Spotless applies itself to the files on disk. However, when git makes a commit, it does not use the files on disk, it uses the staging area. If you do this:
change foo.txt
spotlessApply
git add foo.txt
git commit -m "blah"
Then your commit will definitely pass a spotlessCheck. But if you do this, it might not:
change foo.txt
git add foo.txt
spotlessApply (changes foo on disk, but not the staged/index foo)
git commit -m "blah" (you committed the dirty foo, not the clean foo)
aside: this three-files-per-file model, with an independent index, is confusing to beginners, and imo of limited utility even to experts, which is why DiffPlug doesn't have a staging area.
@lowwor made an excellent git hook script which uses the stash to run spotlessCheck on staged files.
With our new git integration, it would now be relatively easy for Spotless to have a mode which operates on the staging area directly. This is especially useful for pre-commit hooks, which could either fail on badly formatted content spotlessCheck --staged, or silently fix the commit right before it is created spotlessApply --staged.
Due to merge conflicts that this is likely to generate, implementing this is blocked on #603 and #600. PR's welcome!
- 主要言語
- Java
- スター
- 5.7k
- フォーク
- 560
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 40
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
diffplug/spotless のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
diffplug/spotless の issue をすべて見る
似ている issue
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apache/flink-agents#1156 ·
-
[source-shopify] FAILED bulk operation without partialDataUrl is silently treated as successful オープンarea/connectors autoteam community connectors/source/shopify needs-triage team/use type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100