spring-io / spring-javaformat

Apache License 2.0
795 stars 110 forks source link

Option to target formatting to specific files #372

Closed mmadson closed 1 year ago

mmadson commented 1 year ago

Would like similar capability as:

https://github.com/diffplug/spotless/tree/main/plugin-maven#can-i-apply-spotless-to-specific-files

Thanks.

philwebb commented 1 year ago

Thanks for the suggestion but we don't have a great deal of time to spend on this project and we don't have a need for such a feature in Spring's own projects, I don't think we'll be able to do this.

I'm also keen to keep the project as simple as possible without adding too many configuration options.

Thanks anyway for the suggestion.

wilkinsona commented 1 year ago

@mmadson You may be interested to know that this capability is already available when using Gradle. It's built into Gradle's SourceTask that the formatting tasks extend.

mmadson commented 1 year ago

Very handy thank you @wilkinsona though we currently use maven directly to build so I suspect we'll likely just switch to google-java-format for now. That said for future projects where gradle is an option, will definitely keep this in mind. Much appreciated.