[ 
https://issues.apache.org/jira/browse/SPARK-40221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17585191#comment-17585191
 ] 

Ziqi Liu commented on SPARK-40221:
----------------------------------

[~hyukjin.kwon]  I think running in master should always be good, since it only 
format git diff from master, so running in master actually didn't format 
anything if understand the [dev tools 
guidance|https://spark.apache.org/developer-tools.html] correctly...

 

The issue happened in another branch, but very new 
branch(https://github.com/apache/spark/pull/37661), and I believe I didn't 
modify anything related to scalafmt

It tried to format those files that changed since master then the error 
happened:

 
{code:java}
[INFO] Checking for files changed from master
[INFO] Changed from master:
/Users/ziqi.liu/code/spark/core/src/main/scala/org/apache/spark/internal/config/package.scala
/Users/ziqi.liu/code/spark/core/src/main/scala/org/apache/spark/rdd/AsyncRDDActions.scala
/Users/ziqi.liu/code/spark/core/src/main/scala/org/apache/spark/rdd/RDD.scala
/Users/ziqi.liu/code/spark/core/src/test/scala/org/apache/spark/rdd/RDDSuite.scala
/Users/ziqi.liu/code/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
/Users/ziqi.liu/code/spark/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkPlan.scala
/Users/ziqi.liu/code/spark/sql/core/src/test/scala/org/apache/spark/sql/ConfigBehaviorSuite.scala
[ERROR]
org.scalafmt.dynamic.exceptions.ScalafmtException: missing setting 'version'. 
To fix this problem, add the following line to .scalafmt.conf: 'version=3.2.1'. 
{code}
 

 

> Not able to format using scalafmt
> ---------------------------------
>
>                 Key: SPARK-40221
>                 URL: https://issues.apache.org/jira/browse/SPARK-40221
>             Project: Spark
>          Issue Type: Question
>          Components: Build
>    Affects Versions: 3.4.0
>            Reporter: Ziqi Liu
>            Priority: Major
>
> I'm following the guidance in [https://spark.apache.org/developer-tools.html] 
> using 
> {code:java}
> ./dev/scalafmt{code}
> to format the code, but getting this error:
> {code:java}
> [ERROR] Failed to execute goal 
> org.antipathy:mvn-scalafmt_2.12:1.1.1640084764.9f463a9:format (default-cli) 
> on project spark-parent_2.12: Error formatting Scala files: missing setting 
> 'version'. To fix this problem, add the following line to .scalafmt.conf: 
> 'version=3.2.1'. -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to