You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by yw...@apache.org on 2026/09/10 07:07:36 UTC

(systemds) branch main updated: [SYSTEMDS-3963] Temporarily deactivate the java code formatter in the GitHub workflows

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

ywcb00 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git


The following commit(s) were added to refs/heads/main by this push:
     new b1e3b9e41a [SYSTEMDS-3963] Temporarily deactivate the java code formatter in the GitHub workflows
b1e3b9e41a is described below

commit b1e3b9e41a75d475c6c2746e4453f1a4152e52bd
Author: ywcb00 <yw...@ywcb.org>
AuthorDate: Wed Sep 9 16:35:47 2026 +0200

    [SYSTEMDS-3963] Temporarily deactivate the java code formatter in the GitHub workflows
    
    Closes #2608.
---
 .github/workflows/javaCodestyle.yml | 78 ++++++++++++++++++-------------------
 dev/format-changed.sh               | 12 +++++-
 2 files changed, 49 insertions(+), 41 deletions(-)

diff --git a/.github/workflows/javaCodestyle.yml b/.github/workflows/javaCodestyle.yml
index 12c70f19fe..233457938e 100644
--- a/.github/workflows/javaCodestyle.yml
+++ b/.github/workflows/javaCodestyle.yml
@@ -74,46 +74,46 @@ jobs:
     - name: Run Checkstyle
       run: mvn -ntp -B -Dcheckstyle.skip=false checkstyle:check
 
-  java_format:
-    name: Java Format Check
-    # line-scoped to the PR diff -> needs the pull_request base commit
-    if: github.event_name == 'pull_request'
-    runs-on: ubuntu-latest
-    steps:
-    - name: Checkout Repository
-      uses: actions/checkout@v7
-      with:
-        fetch-depth: 0
+  # java_format:
+  #   name: Java Format Check
+  #   # line-scoped to the PR diff -> needs the pull_request base commit
+  #   if: github.event_name == 'pull_request'
+  #   runs-on: ubuntu-latest
+  #   steps:
+  #   - name: Checkout Repository
+  #     uses: actions/checkout@v7
+  #     with:
+  #       fetch-depth: 0
 
-    - name: Setup Java 17 adopt
-      uses: actions/setup-java@v5
-      with:
-        distribution: adopt
-        java-version: '17'
-        cache: 'maven'
+  #   - name: Setup Java 17 adopt
+  #     uses: actions/setup-java@v5
+  #     with:
+  #       distribution: adopt
+  #       java-version: '17'
+  #       cache: 'maven'
 
-    - name: Setup Python
-      uses: actions/setup-python@v7
-      with:
-        python-version: '3.11'
+  #   - name: Setup Python
+  #     uses: actions/setup-python@v7
+  #     with:
+  #       python-version: '3.11'
 
-    - name: Unit-test the format checker
-      run: |
-        python -m pip install --quiet pytest
-        python -m pytest dev/tests -q
+  #   - name: Unit-test the format checker
+  #     run: |
+  #       python -m pip install --quiet pytest
+  #       python -m pytest dev/tests -q
 
-    - name: Check formatting of PR-edited lines
-      env:
-        BASE_SHA: ${{ github.event.pull_request.base.sha }}
-      run: |
-        # Fails only if the Eclipse formatter would change a line this PR edited.
-        # See dev/format_changed.py for the line-scoping logic.
-        if ! python3 dev/format_changed.py --check "$BASE_SHA"; then
-          echo "::error::Some lines edited by this PR are not formatted per dev/CodeStyle_eclipse.xml."
-          echo "Fix only your edited lines locally and commit the result:"
-          echo ""
-          echo "  dev/format-changed.sh"
-          echo ""
-          echo "(Do NOT run a bare 'mvn formatter:format' -- it reformats the whole tree.)"
-          exit 1
-        fi
+  #   - name: Check formatting of PR-edited lines
+  #     env:
+  #       BASE_SHA: ${{ github.event.pull_request.base.sha }}
+  #     run: |
+  #       # Fails only if the Eclipse formatter would change a line this PR edited.
+  #       # See dev/format_changed.py for the line-scoping logic.
+  #       if ! python3 dev/format_changed.py --check "$BASE_SHA"; then
+  #         echo "::error::Some lines edited by this PR are not formatted per dev/CodeStyle_eclipse.xml."
+  #         echo "Fix only your edited lines locally and commit the result:"
+  #         echo ""
+  #         echo "  dev/format-changed.sh"
+  #         echo ""
+  #         echo "(Do NOT run a bare 'mvn formatter:format' -- it reformats the whole tree.)"
+  #         exit 1
+  #       fi
diff --git a/dev/format-changed.sh b/dev/format-changed.sh
index a49192e3d2..cab25c429e 100755
--- a/dev/format-changed.sh
+++ b/dev/format-changed.sh
@@ -43,6 +43,14 @@
 #
 set -euo pipefail
 
-cd "$(git rev-parse --show-toplevel)"
+if [ $# -ne 0 ]; then
+if [[ "$1" == "--force" ]]; then
+    shift;
+    echo "Please check the resulting changes very carefully, as they might contain undesired modifications to the code.";
+    cd "$(git rev-parse --show-toplevel)";
+    exec python3 dev/format_changed.py --fix "$@";
+fi
+fi
 
-exec python3 dev/format_changed.py --fix "$@"
+echo "The formatting script is currently not supported, as it performs undesired modifications of code. You can still run this script with the '--force' flag. However, please double check the results very carefully." >&2;
+exit 1;