dongjoon-hyun commented on code in PR #38258: URL: https://github.com/apache/spark/pull/38258#discussion_r1910535785
########## dev/lint-scala: ########## @@ -21,3 +21,12 @@ SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" SPARK_ROOT_DIR="$(dirname $SCRIPT_DIR)" "$SCRIPT_DIR/scalastyle" "$1" + +# For Spark Connect, we actively enforce scalafmt and check that the produced diff is empty. +./build/mvn -Pscala-2.12 scalafmt:format -Dscalafmt.skip=false -Dscalafmt.validateOnly=true -Dscalafmt.changedOnly=false -pl connector/connect +if [[ $? -ne 0 ]]; then + echo "The scalafmt check failed on connector/connect." + echo "Before submitting your change, please make sure to format your code using the following command:" + echo "./build/mvn -Pscala-2.12 scalafmt:format -Dscalafmt.skip=fase -Dscalafmt.validateOnly=false -Dscalafmt.changedOnly=false -pl connector/connect" + exit 1 +fi Review Comment: Hi, @grundprinzip and @HyukjinKwon . This PR makes `lint-scala` ignore the exit code of `scalastyle`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org