From 9d4e2bd0f31492c2451c214d7541e6f0e8fc48bd Mon Sep 17 00:00:00 2001 From: cody koeninger Date: Sun, 19 Jan 2020 13:12:34 -0600 Subject: [PATCH] SPARK-30570 scalafmt 1.0.3 for scala 2.13 as well, cant think of a better way to handle profile changes than an argument to the dev/scalafmt script --- dev/scalafmt | 4 +++- pom.xml | 43 +++++++++++++++++++++---------------------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/dev/scalafmt b/dev/scalafmt index 7471d90bbd65c..3f69bc98f51c7 100755 --- a/dev/scalafmt +++ b/dev/scalafmt @@ -17,4 +17,6 @@ # limitations under the License. # -./build/mvn -Pscala-2.12 mvn-scalafmt_2.12:format -Dscalafmt.skip=false +VERSION="${@:-2.12}" +./build/mvn -Pscala-$VERSION mvn-scalafmt_$VERSION:format -Dscalafmt.skip=false + diff --git a/pom.xml b/pom.xml index fa4111464f938..0e6f85b6b42c5 100644 --- a/pom.xml +++ b/pom.xml @@ -2863,6 +2863,27 @@ + + org.antipathy + mvn-scalafmt_${scala.binary.version} + 1.0.3 + + ${scalafmt.parameters} + ${scalafmt.skip} + ${scalafmt.skip} + ${scalafmt.skip} + dev/.scalafmt.conf + true + + + + validate + + format + + + + - - org.antipathy - mvn-scalafmt_2.12 - 1.0.3 - - ${scalafmt.parameters} - ${scalafmt.skip} - ${scalafmt.skip} - ${scalafmt.skip} - dev/.scalafmt.conf - true - - - - validate - - format - - - -