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

dongjoon pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.5 by this push:
     new 5a8483bfe621 [SPARK-50784][TESTS] Fix `lint-scala` not to ignore 
`scalastyle` errors
5a8483bfe621 is described below

commit 5a8483bfe6216c22a036fbcc57d4cf2f3b49ebe7
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Fri Jan 10 12:13:27 2025 -0800

    [SPARK-50784][TESTS] Fix `lint-scala` not to ignore `scalastyle` errors
    
    ### What changes were proposed in this pull request?
    
    This PR aims to fix `lint-scala` script not to ignore `scalastyle` errors.
    
    ### Why are the changes needed?
    
    This bug was introduced via the following PR at Apache Spark 3.4.0.
    - #38258
    
    After the above PR, `lint-scala` ignores `scalastyle` error and only 
considers the exit code of `scalafmt` like the following CI result.
    - https://github.com/apache/spark/pull/49428#issuecomment-2582935831
    
    ![Screenshot 2025-01-10 at 07 14 
31](https://github.com/user-attachments/assets/bdaa3be3-5daf-401b-a46f-7c02b7610158)
    
    ### Does this PR introduce _any_ user-facing change?
    
    No, this is a dev-only tool change.
    
    ### How was this patch tested?
    
    Manual review.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #49443 from dongjoon-hyun/SPARK-50784.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
    (cherry picked from commit 9d4b7a5dd44494aa7c19d3f4f83d610530f4e569)
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 dev/lint-scala | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dev/lint-scala b/dev/lint-scala
index 8adac2cecbdb..e25fc138b92d 100755
--- a/dev/lint-scala
+++ b/dev/lint-scala
@@ -20,8 +20,10 @@
 SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
 SPARK_ROOT_DIR="$(dirname $SCRIPT_DIR)"
 
+set -e
 "$SCRIPT_DIR/scalastyle" "$1"
 
+set +e
 # For Spark Connect, we actively enforce scalafmt and check that the produced 
diff is empty.
 ERRORS=$(./build/mvn \
     -Pscala-2.12 \


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to