-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Java files from default Maven Groovy formatting #1051
Conversation
13515b5
to
a86b228
Compare
It feels like Groovy formatters should not touch Java files by default. However, I do not know much about the groovy-eclipse formatter. This might be a backward-incompatible change. Any input is much appreciated! |
Hi @bitwiseman, could you please take a look at this PR and the associated issue? Thanks! |
All Groovy formatters will default to formatting only the following files: * src/main/groovy/**/*.groovy * src/test/groovy/**/*.groovy They will not touch any .*java files. Fixes diffplug#902.
a86b228
to
637f162
Compare
plugin-maven/CHANGES.md
Outdated
* Before `3.0.0`, the default target of groovy was | ||
* `src/main/groovy/**/*.groovy` | ||
* `src/test/groovy/**/*.groovy` | ||
* `src/main/groovy/**/*.java` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small correction. I removed the following file masks:
src/main/java/**/*.java
src/test/java/**/*.java
The Groovy formatter tried to format Java sources that live under the Java sources root. I think it is weird and perhaps even undesirable to format such source files with a Groovy formatter. This PR changes the default behavior, but it is more like a fix in my opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh man that is super weird! It's so weird my brain couldn't read it the first time, thanks for pointing that out! I always agreed that it was a fix, but now I also agree that it is not a "breaking fix".
…hat it is no longer a "breaking fix".
Thank you @nedtwigg! I'll merge this PR. |
|
Released in |
All Groovy formatters will default to formatting only the following files:
src/main/groovy/**/*.groovy
src/test/groovy/**/*.groovy
They will not touch any
.*java
files.Fixes #902.