Allow skipping sortPom
- 主要言語
- Java
- スター
- 5.6k
- フォーク
- 559
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 43
説明
While other formatters allow to set some sort of regular expression to signal which files should be processed, sortPom formatting does not have this option (while sortPom has), [`pom.xml`](https://github.com/diffplug/spotless/blob/main/plugin-maven/src/main/java/com/diffplug/spotless/maven/pom/Pom.java#L35) is hardcoded. This has two drawbacks:
* secondary poms can't be processed by sortPom; i.e., we have some poms that invoke a "secondary" pom in the same folder, which for obvious reasons can't be named `pom.xml`
* it doesn't allow to bypass sortPom formatting. Currently we define some properties at the corporate pom level that allow to disable certain spotless formatters, via the regexs above, so it's easy to skip formatting, or apply it only to a subset of elements
would be nice to have this option for sortPom too. Thanks!
コントリビューションガイド
調査の方向性
plugin-maven/src/main/java/com/diffplug/spotless/maven/pom/Pom.java から始め、特にハードコードされた pom.xml の処理を確認し、他のフォーマッターがファイル名の正規表現を適用する方法と比較してください。sortPom が追加の POM ファイル名を対象にでき、issue で説明されているものと同じ種類の設定によって回避できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- build-system
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100