-
Notifications
You must be signed in to change notification settings - Fork 2
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
What's the difference to the official plugin? #7
Comments
Hello! |
One thing I am missing in both plugins is the ability to format on save without third-party tools like Save Actions or File Watchers. Have you considered adding your plugin as formatter for the Actions on Save section? That would make it perfect. We are trying to replace the standard IntelliJ formatter we currently use with spotless because you can easily use it inside CI/CD but without automatic formatting in the local IDE, this is not ideal. There is an open pull request for this on the official plugin but it hasn't been touched in a while: |
In general, looks like it's real to do. We can call spotless tasks on save. And I think the option above is what you need in order to prevent dev's to push unformatted changes into the repo. Save action is called many times during developing, and each time the system will little hang while spotless is applying. |
I would have done that with a pre-commit hook but I am explicitly looking for the save action. I pretty much disabled auto-save and do it manually so this wouldn't be a big issue but I understand the concerns. |
Maybe I don't fully understand your case. Could you explain the CI/CD flow you expect? |
I delved deeper into the precommit check ability and, unfortunately, obtained disappointing results. If we return to the discussion regarding the ability to format code with Spotless on save, a new concern arises: The proper way, as I see it, is to natively integrate Spotless into the IDE 🙂 |
@rlnt Hi again! The action on save was implemented in PR #17, Hope you'll find it useful |
Just a question. What's the difference between this and the official plugin right here?
https://github.com/ragurney/spotless-intellij-gradle
The text was updated successfully, but these errors were encountered: