Skip to content

Instantly share code, notes, and snippets.

@pdp7
Created May 11, 2026 20:26
Show Gist options
  • Select an option

  • Save pdp7/392911f3af00fe4a7698a31755c52ab6 to your computer and use it in GitHub Desktop.

Select an option

Save pdp7/392911f3af00fe4a7698a31755c52ab6 to your computer and use it in GitHub Desktop.
checkpatch-strict.sh
#!/bin/bash
# Run checkpatch --strict on commits since HEAD~N
# Usage: ./checkpatch-series.sh <num_commits>
COMMITS=${1:?Usage: $0 <num_commits>}
for i in $(git log --oneline HEAD~"${COMMITS}"..HEAD | cut -f1 -d' '); do
echo "$i"
./scripts/checkpatch.pl --strict -g "$i"
echo "=============================================="
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment