spotless icon indicating copy to clipboard operation
spotless copied to clipboard

Suggestion: use JSQLFormatter for SQL beautification

Open manticore-projects opened this issue 3 years ago • 1 comments

Greetings,

I just adopted Spotless to format my Java code via the Eclipse Formatter. Thank you for providing it! Then I stumbled over the documentation and found out that you use DBeaver and Prettier for SQL formatting.

So I wonder, if JSQLFormatter would be a viable alternative. It is a relatively small, yet powerful Java only library for formatting complex SQL statements (MS SQL Server, Oracle, MariaDB, Postgres).

Please have a look at the Examples. You can also Test it online and interactively.

If you find any of that interesting, then please do let me know what was needed to make it happen. I would gladly be of assistance. Cheers!

manticore-projects avatar Sep 06 '22 11:09 manticore-projects

Happy to merge a PR for this.

https://github.com/diffplug/spotless/blob/main/CONTRIBUTING.md

We support multiple competing formatter for lots of filetypes, happy to do the same for SQL.

nedtwigg avatar Sep 14 '22 06:09 nedtwigg