spotless-intellij-gradle
spotless-intellij-gradle copied to clipboard
Format all files before commit
I usually use my personal custom formatting while coding or fixing issues, but before commit I need to execute spotlessApply before committing as the remote build process will check the formatting. Would be nice that the formatting is applied before commit.
Example:
It can be done with a pre-commit hook using Spotless and your build management tool of choice, in-depth discussion here: https://github.com/diffplug/spotless/issues/178
@pri-me tried the pre-commit in the past but didn't work great. Sometimes intellij hanged up and didn't figure out why. Anyway, I've already pulled the solution to https://github.com/lipiridi/spotless-applier.