Skip to content

leh800b: added make and remove rules for scmcpld driver #94

leh800b: added make and remove rules for scmcpld driver

leh800b: added make and remove rules for scmcpld driver #94

Workflow file for this run

name: Check Patch
on: [push, pull_request]
jobs:
checkpatch:
name: Run checkpatch.pl
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y perl libfile-slurp-perl
- name: Download checkpatch.pl
run: |
mkdir -p linux/scripts
curl -o linux/scripts/checkpatch.pl https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl
chmod +x linux/scripts/checkpatch.pl
curl -o linux/scripts/spelling.txt https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt
curl -o linux/scripts/const_structs.checkpatch https://raw.githubusercontent.com/torvalds/linux/master/scripts/const_structs.checkpatch
- name: Run checkpatch.pl on all files in a directory
run: |
find kmods -type f \( -name '*.c' -or -name '*.h' \) -not -path 'kmods/backports/*' -print0 | xargs -0 -I {} sh -c "perl linux/scripts/checkpatch.pl --no-tree --ignore COMPLEX_MACRO,MULTISTATEMENT_MACRO_USE_DO_WHILE,LINUX_VERSION_CODE,ALLOC_WITH_SIZEOF,SYMBOLIC_PERMS --terse --show-types --file {} | tee -a /tmp/checkpatch-output.txt"
if grep -qE 'WARNING:|ERROR:' /tmp/checkpatch-output.txt; then
echo "Warnings or errors found by checkpatch.pl"
exit 1
else
echo "No warnings or errors found by checkpatch.pl."
exit 0
fi