diff options
author | Bernd Schubert <bernd@bsbernd.com> | 2025-01-02 21:38:30 +0100 |
---|---|---|
committer | Bernd Schubert <bernd@bsbernd.com> | 2025-01-02 22:34:49 +0100 |
commit | fbc7b01e5e92c62fd8673c0b500803023d1e80f7 (patch) | |
tree | 5028d7a492c0d501fce051b4281a5efff73d11c0 /.github/workflows/checkpatch.yml | |
parent | fb1168669875312155da984dd4915f130bed091e (diff) | |
download | libfuse-fbc7b01e5e92c62fd8673c0b500803023d1e80f7.tar.gz |
Fix the checkpatch.pl workflow
- The MAINTAINERS test is not valid for libfuse.
- Correct the base commit
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
Diffstat (limited to '.github/workflows/checkpatch.yml')
-rw-r--r-- | .github/workflows/checkpatch.yml | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/.github/workflows/checkpatch.yml b/.github/workflows/checkpatch.yml index 9a3cd1b..3f0eb9f 100644 --- a/.github/workflows/checkpatch.yml +++ b/.github/workflows/checkpatch.yml @@ -18,5 +18,14 @@ jobs: - name: Run checkpatch.pl run: | git fetch origin ${{ github.base_ref }} - base_commit=$(git merge-base FETCH_HEAD ${{ github.event.pull_request.head.sha }}) - ./checkpatch.pl --no-tree -g $base_commit + base_commit=$(git merge-base origin/${{ github.base_ref }} HEAD) + echo "Base commit: $base_commit" + echo "Running checkpatch.pl on all commits in the PR:" + git rev-list --reverse $base_commit..HEAD | while read commit; do + subject=$(git log -1 --format=%s $commit) + echo "Checking commit: $commit - $subject" + if ! ./checkpatch.pl --no-tree --ignore MAINTAINERS,SPDX_LICENSE_TAG,COMMIT_MESSAGE,FILE_PATH_CHANGES,EMAIL_SUBJECT -g $commit; then + echo "checkpatch.pl found issues in commit $commit - $subject" + exit 1 + fi + done |