From: Richard Levitte Date: Thu, 11 Jul 2024 10:41:33 +0000 (+0200) Subject: fix(stylecheck): Take advantage of check-format-commit.sh's new capability X-Git-Tag: openssl-3.4.0-alpha1~347 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edb5dd56fcbeff335f2ab59e8b76780043695814;p=thirdparty%2Fopenssl.git fix(stylecheck): Take advantage of check-format-commit.sh's new capability .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 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/24856) --- diff --git a/.github/workflows/style-checks.yml b/.github/workflows/style-checks.yml index 7ed843f3ba4..69c9ca6c8ef 100644 --- a/.github/workflows/style-checks.yml +++ b/.github/workflows/style-checks.yml @@ -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