Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔄 synced file(s) with playframework/.github #257

Merged
merged 1 commit into from
Jan 25, 2023
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("")
)