Skip to content

Commit 1eba2e5

Browse files
committed
🔄 synced local 'common.sbt' with remote 'sbt/common.sbt'
1 parent 1d99c7f commit 1eba2e5

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

‎common.sbt

+14-2
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,34 @@
55
// To edit this file use the main version in https://github.com/playframework/.github/blob/main/sbt/common.sbt //
66
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
77

8+
/**
9+
* If you need extra commands to format source code or other documents, add following line to your `build.sbt`
10+
* {{{
11+
* val _ = sys.props += ("sbt_formatCode" -> List("<command1>", "<command2>",...).mkString(";"))
12+
* }}}
13+
*/
814
addCommandAlias(
915
"formatCode",
1016
List(
1117
"headerCreateAll",
1218
"scalafmtSbt",
1319
"scalafmtAll",
1420
"javafmtAll"
15-
).mkString(";")
21+
).mkString(";") + sys.props.get("sbt_formatCode").map(";" + _).getOrElse("")
1622
)
1723

24+
/**
25+
* If you need extra commands to validate source code or other documents, add following line to your `build.sbt`
26+
* {{{
27+
* val _ = sys.props += ("sbt_validateCode" -> List("<command1>", "<command2>",...).mkString(";"))
28+
* }}}
29+
*/
1830
addCommandAlias(
1931
"validateCode",
2032
List(
2133
"headerCheckAll",
2234
"scalafmtSbtCheck",
2335
"scalafmtCheckAll",
2436
"javafmtCheckAll"
25-
).mkString(";")
37+
).mkString(";") + sys.props.get("sbt_validateCode").map(";" + _).getOrElse("")
2638
)

0 commit comments

Comments
 (0)