Is there a source code formatter for Groovy?
spidasoftware/format extracts the groovy eclipse plugin and provides a command line interface to it.
Instructions:
git clone [email protected]:spidasoftware/format.git && \
cd format/bin && \
./format /path/to/groovy/file
caveat: this project is no longer maintained however still works as of the time of this post
You can use npm-groovy-lint via command line with --format option :)
https://www.npmjs.com/package/npm-groovy-lint
I've found that BUSL works really well on Groovy files. It's standalone too, so you can use it from your text editor or whatever.