Allow skipping sortPom
- Lingua principale
- Java
- Stelle
- 5.6k
- Fork
- 559
- Merge medio
- 1g 14h
- PR unite (30g)
- 43
Descrizione
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!
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da plugin-maven/src/main/java/com/diffplug/spotless/maven/pom/Pom.java, in particolare dalla gestione hardcoded di pom.xml, e confrontala con il modo in cui gli altri formatter applicano le espressioni regolari ai nomi dei file. Il lavoro è completato quando sortPom può essere applicato a nomi di file POM secondari e può essere escluso tramite lo stesso tipo di configurazione descritto nell'issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- build-system
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100