This is an automated email from the ASF dual-hosted git repository.
wenchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new af8442ee903 [SPARK-41760][BUILD][CONNECT] Enforce scalafmt for Connect
Client module
af8442ee903 is described below
commit af8442ee9036bcf5b864d863d7a918b8fe9dcafd
Author: dengziming <[email protected]>
AuthorDate: Fri Dec 30 12:08:03 2022 +0800
[SPARK-41760][BUILD][CONNECT] Enforce scalafmt for Connect Client module
### What changes were proposed in this pull request?
1. This changes enables enforcing `scalafmt` for the Connect client module
since it's a new module.
2. This change applies `scalafmt` on the existing code-base.
### Why are the changes needed?
Faster, focussed code reviews.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Faster, focussed code reviews.
Closes #39274 from dengziming/SPARK-41760.
Authored-by: dengziming <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
---
.../scala/org/apache/spark/sql/connect/client/SparkConnectClient.scala | 3 ++-
dev/lint-scala | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git
a/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/SparkConnectClient.scala
b/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/SparkConnectClient.scala
index beaae6412be..e188ef0d409 100644
---
a/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/SparkConnectClient.scala
+++
b/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/SparkConnectClient.scala
@@ -23,7 +23,8 @@ class SparkConnectClient(private val userContext:
proto.UserContext) {
/**
* Placeholder method.
- * @return User ID.
+ * @return
+ * User ID.
*/
def userId: String = userContext.getUserId()
}
diff --git a/dev/lint-scala b/dev/lint-scala
index 48ecf57ef47..2549f775e49 100755
--- a/dev/lint-scala
+++ b/dev/lint-scala
@@ -30,13 +30,14 @@ ERRORS=$(./build/mvn \
-Dscalafmt.validateOnly=true \
-Dscalafmt.changedOnly=false \
-pl connector/connect/server \
+ -pl connector/connect/client/jvm \
2>&1 | grep -e "^Requires formatting" \
)
if test ! -z "$ERRORS"; then
echo -e "The scalafmt check failed on connector/connect at following
occurrences:\n\n$ERRORS\n"
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=false
-Dscalafmt.validateOnly=false -Dscalafmt.changedOnly=false -pl
connector/connect/server"
+ echo "./build/mvn -Pscala-2.12 scalafmt:format -Dscalafmt.skip=false
-Dscalafmt.validateOnly=false -Dscalafmt.changedOnly=false -pl
connector/connect/server -pl connector/connect/client/jvm"
exit 1
else
echo -e "Scalafmt checks passed."
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]