question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add vertical-blank SQL formatter?

See original GitHub issue

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:

spotless {
  sql {
    // default value for target files
    target '**/*.sql'
    dbeaver().configFile('sql_formatter_settings.properties')
  }
}

then I could configure sql-formatter like so:

spotless {
  sql {
    // default value for target files
    target '**/*.sql'
    verticalBlank().configFile('sql_formatter_settings.properties')
  }
}

I’m willing to do the work but want to run it past the maintainers before committing any time to it.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
nedtwiggcommented, Jun 23, 2020

Just an update, it is now possible to use any formatter from the NodeJS world, and especially any plugin for prettier, such as prettier-plugin-pg and others.

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.

1reaction
jbduncancommented, Sep 24, 2019

…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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

vertical-blank/sql-formatter - GitHub
GitHub - vertical-blank/sql-formatter: SQL formatter written with only Java Standard Library, without dependencies.
Read more >
Is there any java library to format SQL? - Stack Overflow
Yohei Yamana (vertical-blank) has written an open source, pure-Java standalone, zero-dependencies SQL Formatter. It is available from maven central:
Read more >
com.github.vertical-blank : sql-formatter - Maven Central
Version Updated OSS Index V: ‎ 2.0.3 Updated: 25‑Nov‑2021 open_in_new V: ‎ 2.0.2 Updated: 08‑Aug‑2021 open_in_new V: ‎ 2.0.1 Updated: 02‑Jun‑2021 open_in_new
Read more >
java/vertical-blank/sql-formatter Example - Program Talk
java/vertical-blank/sql-formatter. Directory Path : / sql-formatter. sql-formatter. demo · src · Ezoic report this adRecent Posts.
Read more >
SQL Formatter - com.github.vertical-blank - Maven Repository
Home » com.github.vertical-blank » sql-formatter. logo · SQL Formatter. Simple SQL formatter without dependencies. License, MIT. Tags, githubsqlformatter.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found