]> OCCT Git - occt.git/commitdiff
Testing - Marking failed code formatting #332
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Mon, 3 Feb 2025 09:26:58 +0000 (10:26 +0100)
committerGitHub <noreply@github.com>
Mon, 3 Feb 2025 09:26:58 +0000 (09:26 +0000)
.github/actions/clang-format-check/action.yml
.github/workflows/build-and-test-multiplatform.yml

index 9f23090cccbde3752367b5d86f58d1ae67524ef7..cfff1adf0b23f20388bf806973ee852e270e6aae 100644 (file)
@@ -61,7 +61,9 @@ runs:
       run: |
         git diff > format.patch
         if ((Get-Item format.patch).length -gt 0) {
+          echo "::error::Files need formatting. To fix: 1. Download format.patch 2. \"git apply format.patch\" 3. Commit and push"
           echo "has_changes=true" >> $env:GITHUB_OUTPUT
+          exit 1
         }
 
     - name: Upload patch
index 7bc0eabf33489757f5edfbc1a1b73165034236ad..1cd4fd39635e272a7090ae2a1f6c04490fed6fe3 100644 (file)
@@ -33,13 +33,6 @@ jobs:
       with:
         base-ref: ${{ github.event.pull_request.base.ref || 'master' }}
 
-    - name: Fail if changes needed
-      if: steps.clang-format-check.outputs.has-changes == 'true'
-      shell: pwsh
-      run: |
-        echo "::error::Files need formatting. To fix: 1. Download format.patch 2. \"git apply format.patch\" 3. Commit and push"
-        exit 1
-
   prepare-and-build-windows-x64:
     name: Prepare and Build on Windows with MSVC (x64)
     runs-on: windows-2022