Skip to content

add lint check

add lint check #2

Workflow file for this run

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-tools-$(uname -r)
- name: checkpatch
shell: bash
run: |
cd /lib/modules/$(uname -r)/build
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|\$"