forked from SCST-project/scst
-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (43 loc) · 1.38 KB
/
checkpatch_push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Checkpatch upon push
on:
push:
branches:
- master
jobs:
checkpatch:
name: ${{matrix.commit.message}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
commit: ${{github.event.commits}}
steps:
- name: Checkout code
uses: actions/checkout@main
with:
ref: ${{matrix.commit.id}}
fetch-depth: 2
- name: Download checkpatch.pl
run: |
curl https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl -o checkpatch.pl
curl https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt -o spelling.txt
curl https://raw.githubusercontent.com/torvalds/linux/master/scripts/const_structs.checkpatch -o const_structs.checkpatch
chmod +x checkpatch.pl
- name: Run checkpatch.pl
run: |
ignore=(
MISSING_SIGN_OFF
EMAIL_SUBJECT
UNKNOWN_COMMIT_ID
NO_AUTHOR_SIGN_OFF
COMMIT_LOG_USE_LINK
BAD_REPORTED_BY_LINK
FILE_PATH_CHANGES
SPDX_LICENSE_TAG
LINUX_VERSION_CODE
CONSTANT_COMPARISON
NEW_TYPEDEFS
SPACING
)
ignore_str=${ignore[*]}
git format-patch -1 --stdout | ./checkpatch.pl --no-tree --show-types --ignore="${ignore_str// /,}" -