From be9dc369c92be2599f51e33fbdf9ea7f2db1d567 Mon Sep 17 00:00:00 2001 From: cody koeninger Date: Sun, 19 Jan 2020 12:27:01 -0600 Subject: [PATCH 1/2] SPARK-30570 scalafmt 1.0.3 onlyChangedFiles appears to work correctly on scala 2.12 --- dev/scalafmt | 5 +---- pom.xml | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dev/scalafmt b/dev/scalafmt index 0541a4058467b..7471d90bbd65c 100755 --- a/dev/scalafmt +++ b/dev/scalafmt @@ -17,7 +17,4 @@ # limitations under the License. # -# by default, format only files that differ from git master -params="${@:---diff}" - -./build/mvn -Pscala-2.12 mvn-scalafmt_2.12:format -Dscalafmt.skip=false -Dscalafmt.parameters="$params" \ No newline at end of file +./build/mvn -Pscala-2.12 mvn-scalafmt_2.12:format -Dscalafmt.skip=false diff --git a/pom.xml b/pom.xml index 58c05357ef417..fa4111464f938 100644 --- a/pom.xml +++ b/pom.xml @@ -162,7 +162,7 @@ 3.2.2 2.12.10 2.12 - --diff --test + --test true 1.9.13 @@ -3031,13 +3031,14 @@ org.antipathy mvn-scalafmt_2.12 - 0.12_1.5.1 + 1.0.3 ${scalafmt.parameters} ${scalafmt.skip} ${scalafmt.skip} ${scalafmt.skip} dev/.scalafmt.conf + true From 9d4e2bd0f31492c2451c214d7541e6f0e8fc48bd Mon Sep 17 00:00:00 2001 From: cody koeninger Date: Sun, 19 Jan 2020 13:12:34 -0600 Subject: [PATCH 2/2] 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 - - - -