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 <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24856)
This commit is contained in:
Richard Levitte 2024-07-11 12:41:33 +02:00 committed by Matt Caswell
parent c2083f4ec6
commit edb5dd56fc

View 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