forked from playframework/playframework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.sbt
38 lines (35 loc) · 1.46 KB
/
common.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// NOTE: !!! THIS IS A COPY !!! //
// 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(";") + 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(";") + sys.props.get("sbt_validateCode").map(";" + _).getOrElse("")
)