2021-07-27 13:13:30 -05:00
|
|
|
on: pull_request
|
2021-07-12 13:21:46 -05:00
|
|
|
|
2022-03-23 11:47:57 -05:00
|
|
|
name: Check Code Style (checkpatch)
|
2021-07-12 13:21:46 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
DL_DIR: ../downloads
|
|
|
|
BUILD_DIR: ../build
|
|
|
|
steps:
|
|
|
|
- name: Checkout Code
|
2023-04-13 10:38:59 -05:00
|
|
|
uses: actions/checkout@v3
|
2021-07-12 13:21:46 -05:00
|
|
|
with:
|
2023-04-13 10:38:59 -05:00
|
|
|
fetch-depth: 0
|
|
|
|
- name: Checkout Base
|
|
|
|
run: |
|
|
|
|
git fetch origin ${{ github.event.pull_request.base.ref }}
|
|
|
|
echo "The current base for checkpatch is: $(git show FETCH_HEAD --oneline --raw)"
|
2022-03-23 11:47:57 -05:00
|
|
|
- name: Install required packages (apt-get)
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2023-03-17 14:39:57 -05:00
|
|
|
sudo apt-get install patchutils python3-ply python3-git
|
2021-07-12 13:21:46 -05:00
|
|
|
- name: Run checkpatch
|
|
|
|
run: |
|
2023-04-13 10:38:59 -05:00
|
|
|
git diff --patch FETCH_HEAD \
|
2022-03-23 11:47:57 -05:00
|
|
|
| filterdiff \
|
|
|
|
-x "a/src/jtag/drivers/libjaylink/*" \
|
|
|
|
-x "a/tools/git2cl/*" \
|
|
|
|
-x "a/.github/*" \
|
2023-03-01 17:13:37 -06:00
|
|
|
-x "a/HACKING" \
|
2022-03-23 11:47:57 -05:00
|
|
|
| ./tools/scripts/checkpatch.pl --no-signoff -
|