diffplug / diffplug/spotless

Allow skipping sortPom

Open
#2,849 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
5.6k
Forks
559
Avg merge
1d 13h
Merged PRs (30d)
34

Description

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!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.