-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Gradle Spotless Integration for Java Formatting? #243
Comments
Hi @jtgoen, first of all thanks for your interest in the formatter plugin for NetBeans. So far, I didn't see any reason to integrate the spotless Java formatter as it just wraps the Google and Palantir Java formatter and their both already included, therefore I just used the ones I need, but sure the formatter is already included as a dependency and I could add it as a choice as well. I'll check the sources and add the formatter in the next release if that helps you. Cheers, |
@jtgoen I finally had the time to look into the Spotless Code and I think I have an idea what you are looking for, but I don't think it fits into this plugin as it is only meant for formatting code and Spotless seems to do a bit more than just formatting. Maybe I could still include some of the features from Spotless into the NetBeans plugin, but it seems Spotless is working only with folders and not with single files, but NetBeans in most cases works with files and just in some cases with folders. I will have a closer look into this, it could help to see an example Maven/Gradle Spotless Plugin configuration to get an idea how you are using it, would be great if you could provide your configuration and what you would expect to be done within NetBeans as well. But I will move this ticket into the next major version as it will be a bit more work as I expected. |
@funfried Thanks for following up on this! In the interim it seems our project has been having difficulty integrating the previously mentioned VSCode Extension that exhibited the behavior we were hoping for (hasn't been updated since last year, so likely some light code rot), so we're currently stuck with formatting through our Gradle I'll see about throwing together a small toy example of how our project has the Spotless Plugin configured to demonstrate our current use-case. |
@jtgoen Any news regarding this? |
My project is planning to move toward integrating the gradle spotless plugin into our workflow, and have gotten to the point where we can apply our spotless configuration to our Java code via pre-commit hook as well as direct invocation via gradle and their VSCode Plugin.
Many of us on the project use NetBeans, and were hoping to integrate our spotless setup into the editor workflow via e.g. format on save, etc with this plugin.
However, looking at the overview page it seems that while applying formatters directly that spotless allows us to leverage through configuration (e.g. Google formatter, eclipse, Spring, etc) is supported, it doesn't look like there's direct spotless support for Java through this plugin?
I only ask since it seems spotless is being leveraged successfully for DBeaver SQL formatting, so maybe it's easier than it seems to integrate for Java?
Let me know if this is already supported and I'm just not understanding something, or if supporting this would be too significant a lift.
Thanks!
The text was updated successfully, but these errors were encountered: