-
Notifications
You must be signed in to change notification settings - Fork 460
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
Add vertical-blank SQL formatter? #459
Comments
That would be great! We have multiple formatters available for many file types (e.g. eclipse vs google-java-format for java, tsfmt vs prettier for typescript, prettier vs WTP for web resources, etc.). Spotless is opinionated that you should use automatic code formatting, it is explicitly agnostic about which style you should use. |
Perhaps some useful background: #156 |
Cool. We're evaluating a few different formatters to find one we like. When we choose, I'll head in that direction. vertical-blank is winning right now. |
@colindean To add to @nedtwigg's comments, I did a search just now and I see that vertical-blank's sql-formatter is a Java port of zeroturnaround's sql-formatter for JavaScript, and that vertical-blank's formatter hasn't been updated in a few months. Thus if you felt inclined to submit a PR (no pressure, though!), I'd suggest you look into how Spotless integrates the JavaScript formatter prettier, and then use the same technique to integrate zeroturnaround's sql-formatter. If you need any help with this, I'd be more than happy to guide you in any way I can. :) |
That being said, I'm equally happy to help out with integrating vertical-blank's formatter if you'd prefer that. :) |
...and I've just seen your earlier comment about you still deciding which formatter to go for. Sorry about that! In any case, I'm happy to help in any way I can! |
Just an update, it is now possible to use any formatter from the NodeJS world, and especially any plugin for We're still happy to take a PR for vertical-blank, or any other SQL formatter. But since this has sat dormant for almost a year, I'm going to close it for now. Happy to reopen if there is renewed interest. |
I'm setting up SQL formatting for the benefit of some data scientists on my team. They're not a fan of how DBeaver formats SQL but they do like how vertical-blank's sql-formatter formats SQL.
Would it be permissible to add an additional SQL formatter that uses this other library?
I figure if DBeaver is configured like so:
then I could configure sql-formatter like so:
I'm willing to do the work but want to run it past the maintainers before committing any time to it.
The text was updated successfully, but these errors were encountered: