Skip to content

Commit

Permalink
Merge pull request #257 from playframework/repo-sync/github/default
Browse files Browse the repository at this point in the history
πŸ”„ synced file(s) with playframework/.github
  • Loading branch information
mkurz authored Jan 25, 2023
2 parents 1d99c7f + 1eba2e5 commit 130a79e
Showing 1 changed file with 14 additions and 2 deletions.
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("")
)

0 comments on commit 130a79e

Please sign in to comment.