]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
fix(stylecheck): Take advantage of check-format-commit.sh's new capability
authorRichard Levitte <levitte@openssl.org>
Thu, 11 Jul 2024 10:41:33 +0000 (12:41 +0200)
committerMatt Caswell <matt@openssl.org>
Fri, 12 Jul 2024 14:37:07 +0000 (15:37 +0100)
.github/workflows/style-checks.yml now runs util/check-format-commit.sh
with the whole range of commits of the given PR.  This allows code style
fixups to be in a separate commit.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24856)

.github/workflows/style-checks.yml

index 7ed843f3ba459256f6f8fa5475413d62ec481568..69c9ca6c8ef6261b8a6595c1166988715f103627 100644 (file)
@@ -33,18 +33,15 @@ jobs:
         REFSTART=$(git rev-parse $GITHUB_BASE_REF)
         REFEND=$(git rev-parse HEAD)
         echo "Checking from $REFSTART to $REFEND"
-        for i in $(git log --no-merges --format=%H $REFSTART..$REFEND)
-        do
-          echo "::group::Style report for commit $i"
-          set +e
-          ./util/check-format-commit.sh $i
-          if [ $? -ne 0 ]
-          then
-            ERRORS_FOUND=1
-          fi
-          set -e
-          echo "::endgroup::"
-        done
+        echo "::group::Style report for commits $REFSTART..$REFEND"
+        set +e
+        ./util/check-format-commit.sh $REFSTART..$REFEND
+        if [ $? -ne 0 ]
+        then
+          ERRORS_FOUND=1
+        fi
+        set -e
+        echo "::endgroup::"
         SKIP_TEST=$(gh pr view $PR_NUMBER --json labels --jq '.labels[] | select(.name == "style: waived") | .name')
         if [ -z "$SKIP_TEST" ]
         then