Allow skipping sortPom
- Vorherrschende Sprache
- Java
- Sterne
- 5.6k
- Forks
- 559
- Ø Merge
- 1 T. 14 Std.
- Gemergte PRs (30 T.)
- 43
Beschreibung
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!
Beitragsleitfaden
Rechercherichtung
Beginne in plugin-maven/src/main/java/com/diffplug/spotless/maven/pom/Pom.java, insbesondere bei der fest codierten pom.xml-Verarbeitung, und vergleiche sie damit, wie andere Formatierer reguläre Ausdrücke für Dateinamen anwenden. Fertig ist die Änderung, wenn sortPom auf sekundäre POM-Dateinamen abzielen kann und über dieselbe Art von Konfiguration umgangen werden kann, die im Issue beschrieben ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- build-system
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100