Copilot commented on code in PR #12844:
URL: https://github.com/apache/gluten/pull/12844#discussion_r3826428643


##########
dev/format-scala-code.sh:
##########
@@ -28,10 +28,11 @@ COMMAND=$1
 
 if [[ "$COMMAND" == "check" ]]; then
   echo "Checking Scala code style.."
-  ${MVN_CMD} -q spotless:check $PROFILES
+  ${MVN_CMD} -q spotless:check scalastyle:check $PROFILES
 elif [[ "$COMMAND" == "apply" ]] || [[ "$COMMAND" == "" ]]; then
   echo "Fixing Scala code style.."
-  ${MVN_CMD} -q spotless:apply $PROFILES
+  # scalastyle only reports violations (e.g. line length); it doesn't fix them.
+  ${MVN_CMD} -q spotless:apply scalastyle:check $PROFILES

Review Comment:
   In the "apply" path, running `scalastyle:check` will make 
`./dev/format-scala-code.sh` exit non-zero for violations that Spotless cannot 
fix (as noted in the comment). This breaks the GitHub Actions "Fix" step in 
`.github/workflows/scala_code_format.yml` because a failing script prevents 
`git show` from running, reducing the usefulness of the auto-fix output.



-- 
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]

Reply via email to