Skip to content

Commit

Permalink
SPARK-30570 scalafmt 1.0.3 for scala 2.13 as well, cant think of a be…
Browse files Browse the repository at this point in the history
…tter way to handle profile changes than an argument to the dev/scalafmt script
  • Loading branch information
koeninger committed Jan 19, 2020
1 parent be9dc36 commit 9d4e2bd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
4 changes: 3 additions & 1 deletion dev/scalafmt
Original file line number Diff line number Diff line change
Expand Up @@ -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

43 changes: 21 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2863,6 +2863,27 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.antipathy</groupId>
<artifactId>mvn-scalafmt_${scala.binary.version}</artifactId>
<version>1.0.3</version>
<configuration>
<parameters>${scalafmt.parameters}</parameters> <!-- (Optional) Additional command line arguments -->
<skip>${scalafmt.skip}</skip> <!-- (Optional) skip formatting -->
<skipSources>${scalafmt.skip}</skipSources>
<skipTestSources>${scalafmt.skip}</skipTestSources>
<configLocation>dev/.scalafmt.conf</configLocation> <!-- (Optional) config location -->
<onlyChangedFiles>true</onlyChangedFiles>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
Couple of dependencies are coming in bundle format (bundle is just a normal jar which
contains OSGi metadata in the manifest). If one don't use OSGi, then a bundle will work as
Expand Down Expand Up @@ -3027,28 +3048,6 @@
<build>
<pluginManagement>
<plugins>
<!-- SPARK-29293 currently not able to update to 1.x for Scala 2.13 -->
<plugin>
<groupId>org.antipathy</groupId>
<artifactId>mvn-scalafmt_2.12</artifactId>
<version>1.0.3</version>
<configuration>
<parameters>${scalafmt.parameters}</parameters> <!-- (Optional) Additional command line arguments -->
<skip>${scalafmt.skip}</skip> <!-- (Optional) skip formatting -->
<skipSources>${scalafmt.skip}</skipSources>
<skipTestSources>${scalafmt.skip}</skipTestSources>
<configLocation>dev/.scalafmt.conf</configLocation> <!-- (Optional) config location -->
<onlyChangedFiles>true</onlyChangedFiles>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down

0 comments on commit 9d4e2bd

Please sign in to comment.