Skip to content

Commit

Permalink
πŸ”„ synced local 'common.sbt' with remote 'sbt/common.sbt'
Browse files Browse the repository at this point in the history
  • Loading branch information
ihostage committed Jan 25, 2023
1 parent 1d99c7f commit 99361c7
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 an extra commands to format source code, add the next code to your `build.sbt`
* {{{
* val _ = sys.props += ("sbt_formatCode" -> List(...).mkString(";"))
* }}}
*/
addCommandAlias(
"formatCode",
List(
"headerCreateAll",
"scalafmtSbt",
"scalafmtAll",
"javafmtAll"
).mkString(";")
).mkString(";") + sys.props.get("sbt_formatCode").map(";" + _).getOrElse("")
)

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

0 comments on commit 99361c7

Please sign in to comment.