Skip to content

Commit

Permalink
add lint check
Browse files Browse the repository at this point in the history
  • Loading branch information
vankoven committed Aug 29, 2024
1 parent 11285c2 commit 0b58cad
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint
on: [push]
jobs:
diff-upstream:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: install kernel headers
run: |
sudo apt update
sudo apt install -y linux-headers-$(uname -r)
- name: checkpatch
shell: bash
run: |
cd /lib/modules/$(uname -r)/build
touch COPYING CREDITS MAINTAINERS README
scripts/checkpatch.pl --ignore \
LINUX_VERSION_CODE,CONSTANT_COMPARISON \
-f ${GITHUB_WORKSPACE}/src/kmod/{rex.c,rex.h,rex_trace.h} \
--codespell --codespellfile \
/usr/lib/python3/dist-packages/codespell_lib/data/dictionary.txt
- name: coccicheck
run: |
make -C /lib/modules/$(uname -r)/build \
C=2 CHECK=/lib/modules/$(uname -r)/build/scripts/coccicheck \
PYTHONHOME=/usr \
M=$PWD/src \
-j$(nproc) kmod/rex.o \
| grep --line-buffered --color -E "WARNING|\$"

0 comments on commit 0b58cad

Please sign in to comment.