Skip to content

Commit

Permalink
[SPARK-38641][BUILD] Get rid of invalid configuration elements in mvn…
Browse files Browse the repository at this point in the history
…_scalafmt in main pom.xml

### What changes were proposed in this pull request?
In main pom.xml, for mvn_scalafmt plugin, I removed 'parameters' since it's invalid , and replace 'skip' with 'validateOnly' since 'skip' is invalid too.

### Why are the changes needed?
I think we should not leave invalid items there in the pom.xml

I've contacted the author of mvn_scalafmt, Ciaran Kearney, to confirm if these 2 configuration items are no longer there since v 1.0.0, and he said: "That's correct.  The command line parameters were removed by scalafmt itself a few versions ago and skip was replaced by validateOnly (which checks formatting without changing files."

### Does this PR introduce _any_ user-facing change?
Yes

### How was this patch tested?
Run mvn-scalafmt_2.12:format locally via mvn.

Closes #35956 from morvenhuang/SPARK-38641.

Authored-by: morvenhuang <[email protected]>
Signed-off-by: Sean Owen <[email protected]>
  • Loading branch information
morvenhuang authored and srowen committed Mar 24, 2022
1 parent e410d98 commit de960a5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@
-->

<scala-maven-plugin.version>4.5.6</scala-maven-plugin.version>
<scalafmt.parameters>--test</scalafmt.parameters>
<!-- for now, not running scalafmt as part of default verify pipeline -->
<scalafmt.skip>true</scalafmt.skip>
<codehaus.jackson.version>1.9.13</codehaus.jackson.version>
Expand Down Expand Up @@ -3350,8 +3349,7 @@
<artifactId>mvn-scalafmt_${scala.binary.version}</artifactId>
<version>1.0.4</version>
<configuration>
<parameters>${scalafmt.parameters}</parameters> <!-- (Optional) Additional command line arguments -->
<skip>${scalafmt.skip}</skip> <!-- (Optional) skip formatting -->
<validateOnly>${scalafmt.skip}</validateOnly> <!-- (Optional) skip formatting -->
<skipSources>${scalafmt.skip}</skipSources>
<skipTestSources>${scalafmt.skip}</skipTestSources>
<configLocation>dev/.scalafmt.conf</configLocation> <!-- (Optional) config location -->
Expand Down

0 comments on commit de960a5

Please sign in to comment.