GitHub Action
checkpatch.pl PR review
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.
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:
.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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
The checkpatch action will posting comments for error/warning result to the PR conversation.
The Github action has a limitation that doesn't have write permission for PR from forked repository. So the action cannot write a comment to the PR.
.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
You can find the error/waring result from Github action console log.
Since the checkpatch.pl
file is a script in the Linux kernel source tree, you must follow the GPL-2.0 license, which is your kernel license.