mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.43k stars 290 forks source link

Expose the SQL formatter as a command line tool #1260

Closed sgronblo closed 1 week ago

sgronblo commented 6 months ago

Is your feature request related to a problem? Please describe. We are looking for a decent SQL formatter that we could use to format all our SQL files. SQLTools seems quite ok. But we wouldn't like to mandate that all members must use VSCode.

Describe the solution you'd like It would be great if the formatter was exposed as a command line tool so it could be used by non-VSCode users or automatically as part of a CI build.

Describe alternatives you've considered I tried googling for "vscode sqltools command line"

Additional context Nothing much to add

rangedsp commented 2 weeks ago

The formatter is a npm package, it should be quite simple to build a script that calls the formatter package: https://github.com/mtxr/vscode-sqltools/tree/dev/packages/formatter