- Build plugin and push to local sbt repository using sbt-shell:
publishLocal
- Add plugin to your project by adding new line in file
project/plugins.sbt
:
addSbtPlugin("pretty-sql-sbt-plugin" % "pretty-sql-sbt-plugin" % "0.1.8")
-
Run sbt-shell and execute task:
Format all Scala files in current base directory:
formatSQL
Format only provided Scala file:
formatSQL src/main/scala/com/example/test/SqlTest.scala