grundprinzip commented on code in PR #38258: URL: https://github.com/apache/spark/pull/38258#discussion_r996479670
########## dev/lint-scala: ########## @@ -21,3 +21,13 @@ 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 -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 -pl connector/connect" Review Comment: This piece here is taken from the existing `dev/scalafmt` script and slightly adjusted to only reformat the Spark Connect module. I don't think we've ported the usage of `scalafmt` to SBT. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
