-
Notifications
You must be signed in to change notification settings - Fork 17
38 lines (32 loc) · 1.27 KB
/
checkpatch.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
name: checkpatch
on:
pull_request:
branches: [ main ]
permissions: read-all
jobs:
checkpatch:
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Download Checkpatch Files from Zephyr RTOS
shell: bash
run: |
wget https://github.com/zephyrproject-rtos/zephyr/raw/main/scripts/checkpatch.pl -O ./checkpatch.pl
chmod +x ./checkpatch.pl
wget https://github.com/zephyrproject-rtos/zephyr/raw/main/.checkpatch.conf -O ./.checkpatch.conf
wget https://github.com/zephyrproject-rtos/zephyr/raw/main/scripts/spelling.txt -O ./spelling.txt
echo "--ignore PREFER_ALIGNED" >> ./.checkpatch.conf
echo "--ignore NEW_TYPEDEFS" >> ./.checkpatch.conf
echo "--ignore PREFER_PACKED" >> ./.checkpatch.conf
echo "--ignore CONSTANT_COMPARISON" >> ./.checkpatch.conf
echo "--ignore FUNCTION_ARGUMENTS" >> ./.checkpatch.conf
- name: Set Git Base
shell: bash
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}
echo "checkpatch base is: $(git show FETCH_HEAD --oneline --raw)"
- name: Run Checkpath
shell: bash
run:
git diff --patch FETCH_HEAD | ./checkpatch.pl --no-tree --codespellfile ./spelling.txt -