This is an automated email from the ASF dual-hosted git repository.

jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git


The following commit(s) were added to refs/heads/master by this push:
     new daab95b81 [AMORO-3863] Add script to reformat code (#3862)
daab95b81 is described below

commit daab95b816eb2efeb82df1ffcacc193a5ebeb49d
Author: Fei Wang <[email protected]>
AuthorDate: Sun Nov 2 22:58:59 2025 -0800

    [AMORO-3863] Add script to reformat code (#3862)
    
    * format
    
    * spark profiles
---
 CONTRIBUTING.md |  2 +-
 dev/reformat    | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 618305ce8..46de0a962 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -181,7 +181,7 @@ Amoro uses 
[Spotless](https://github.com/diffplug/spotless/tree/main/plugin-mave
 [google-java-format](https://github.com/google/google-java-format) to format 
the Java code. For
 Scala, it uses Spotless with [scalafmt](https://scalameta.org/scalafmt/).
 
-You can format your code by executing the command `build/mvn spotless:apply` 
in the root directory of
+You can format your code by executing the command `dev/reformat` in the root 
directory of
 project.
 
 Or you can configure your IDEA to automatically format your code. Then you 
will need to install
diff --git a/dev/reformat b/dev/reformat
new file mode 100755
index 000000000..f998bff1c
--- /dev/null
+++ b/dev/reformat
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -x
+
+PROJECT_HOME="$(cd "`dirname "$0"`/.."; pwd)"
+
+$PROJECT_HOME/build/mvn spotless:apply "-Psupport-all-formats,spark-3.5"
+$PROJECT_HOME/build/mvn spotless:apply "-Pspark-3.3"

Reply via email to