Skip to content

Commit 81da98b

Browse files
committed
github: add checkpatch action
Add checkpatch.pl invocation for new pull requests. This is using existing GitHub action from [1]. [1] https://github.com/webispy/checkpatch-action Signed-off-by: Igor Opaniuk <[email protected]>
1 parent 4bb672f commit 81da98b

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.checkpatch.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
--no-tree
2+
--strict
3+
--ignore FILE_PATH_CHANGES
4+
--ignore EMAIL_SUBJECT

.github/workflows/checkpatch.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Checkpatch Review
2+
on: [pull_request]
3+
jobs:
4+
check-patch:
5+
name: checkpatch review
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: 'Calculate PR commits + 1'
9+
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV
10+
- uses: actions/checkout@v3
11+
with:
12+
ref: ${{ github.event.pull_request.head.sha }}
13+
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
14+
- name: Run checkpatch review
15+
uses: webispy/checkpatch-action@v9

0 commit comments

Comments
 (0)