Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions common.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,34 @@
// To edit this file use the main version in https://github.com/playframework/.github/blob/main/sbt/common.sbt //
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/**
* If you need extra commands to format source code or other documents, add following line to your `build.sbt`
* {{{
* val _ = sys.props += ("sbt_formatCode" -> List("<command1>", "<command2>",...).mkString(";"))
* }}}
*/
addCommandAlias(
"formatCode",
List(
"headerCreateAll",
"scalafmtSbt",
"scalafmtAll",
"javafmtAll"
).mkString(";")
).mkString(";") + sys.props.get("sbt_formatCode").map(";" + _).getOrElse("")
)

/**
* If you need extra commands to validate source code or other documents, add following line to your `build.sbt`
* {{{
* val _ = sys.props += ("sbt_validateCode" -> List("<command1>", "<command2>",...).mkString(";"))
* }}}
*/
addCommandAlias(
"validateCode",
List(
"headerCheckAll",
"scalafmtSbtCheck",
"scalafmtCheckAll",
"javafmtCheckAll"
).mkString(";")
).mkString(";") + sys.props.get("sbt_validateCode").map(";" + _).getOrElse("")
)