The checkpatch.pl
is a perl script to verify that your code conforms to the Linux kernel coding style. This project uses checkpatch.pl
to automatically review and leave comments on pull requests.
You can also check the comments directly in the console log.
.github/workflows/main.yml
name: checkpatch review
on: [pull_request]
jobs:
my_review:
name: checkpatch review
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run checkpatch review
uses: webispy/checkpatch-action@master
For using a custom checkpatch script, pass the CHECKPATCH_COMMAND
environment
variable. For example, for DPDK's checkpatches.sh
script use:
name: checkpatch review
on: [pull_request]
jobs:
my_review:
name: checkpatch review
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run DPDK checkpatches.sh review
uses: webispy/checkpatch-action@master
env:
DPDK_CHECKPATCH_PATH: /usr/bin/checkpatch.pl
CHECKPATCH_COMMAND: ./devtools/checkpatches.sh
Following files are used to this project.
- https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl
- https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt
From zephyr project:
You can find the Dockerfile from docker branch of this repository.
The checkpatch.pl
file is a script in the Linux kernel source tree, so checkpatch-action projects and forked projects must comply with the GPL-2.0 license (kernel license).