github: Enhance checkpatch_pull error handling

Add an error variable to track errors during the loop in
checkpatch_pull.yml, allowing the workflow to run checkpatch for all
commits before exiting with the appropriate status.

Additionally, add COMMIT_LOG_USE_LINK to the ignore list for both
pull and push workflows
This commit is contained in:
Gleb Chesnokov
2023-04-28 15:37:47 +03:00
parent 33dedb2946
commit 15229d00cc
2 changed files with 7 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ jobs:
EMAIL_SUBJECT
UNKNOWN_COMMIT_ID
NO_AUTHOR_SIGN_OFF
COMMIT_LOG_USE_LINK
FILE_PATH_CHANGES
SPDX_LICENSE_TAG
LINUX_VERSION_CODE
@@ -39,9 +40,13 @@ jobs:
base_commit=${{github.event.pull_request.base.sha}}
commits=$(git log --pretty=format:"%h" $base_commit..HEAD)
err=0
for commit in $commits; do
echo "Running checkpatch.pl for commit $commit"
git format-patch -1 --stdout $commit | ./checkpatch.pl --no-tree --show-types --ignore="${ignore_str// /,}" -
echo "========================================"
git format-patch -1 --stdout $commit | ./checkpatch.pl --no-tree --show-types --ignore="${ignore_str// /,}" - || err=1
echo
done
exit $err