workflows: We all love checkpatch, so add it to the CI workflows

This is currently running on defaults, so the --strict desired
for media drivers and similar won't be observed. That may be
possible to add later.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
Dave Stevenson
2023-03-08 15:28:19 +00:00
committed by Dom Cobley
parent 61310a5c03
commit 76e3eef51a
2 changed files with 22 additions and 0 deletions

18
.github/workflows/checkpatch.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Advisory checkpatch review
on: [pull_request]
jobs:
review:
name: checkpatch review
runs-on: ubuntu-latest
steps:
- name: 'Calculate PR commits + 1'
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
- name: Copy checkpatch.conf
run: cp ${{github.workspace}}/.github/workflows/ci_checkpatch.conf ${{github.workspace}}/.checkpatch.conf
- name: Run checkpatch review
uses: webispy/checkpatch-action@v9

4
.github/workflows/ci_checkpatch.conf vendored Normal file
View File

@@ -0,0 +1,4 @@
--no-tree
--ignore FILE_PATH_CHANGES
--ignore GIT_COMMIT_ID
--ignore SPDX_LICENSE_TAG