-
Notifications
You must be signed in to change notification settings - Fork 460
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
Spotless replaces package-info.java's javadoc with the license #1
Comments
We (the JUnit Lambda team) would love to see some sort of flag to allow |
I'm happy to take a PR for this, or I'll have a bugfix by Monday. In the meantime, you can copy-paste the little "target" snippet above as a workaround. |
Thanks, @nedtwigg! No rush on the fix. For the time being, I've already used the explicit |
Fixed in 1.3.2. |
That does the job. Thanks! |
By the way, JUnit Lambda (a.k.a., JUnit 5) also uses Spotless... in case you want to list it in the README as well. https://github.com/junit-team/junit-lambda/blob/master/build.gradle |
The formatter runs in steps - indent, then header, then eclipse, etc. The old workaround disabled all steps in package-info, but in 1.3.2 it disables only the license-header step, so you still get checking for trailing white space, eclipse formatter, etc. Probably one of the other steps is disagreeing with your package-info. Thanks for junit 5 info, I'll definitely add that!
|
If Spotless has a
licenseHeader
specified, it replaces everything between the top of the file and thepackage
statement with the license. This works for regular classes, but it doesn't work forpackage-info.java
files.As a workaround, you can do this:
Spotless' default settings should play nicely with
package-info.java
, but at the moment it's not a big enough problem for me to actually fix. If this is an actual problem for you, reply to this issue and I'll actually fix it.The text was updated successfully, but these errors were encountered: