]>
git.proxmox.com Git - mirror_frr.git/blob - tools/checkpatch.sh
da23d266a11e973c5d5aa176342d425e2bfe0539
2 # Check a patch for style errors.
4 # ./checkpatch.sh <patch>
5 checkpatch
="./checkpatch.pl --no-tree -f"
7 git status |
grep "working directory clean"
9 echo "[!] git working directory must be clean."
14 bash
-c "cd .. && git apply $1 2> /dev/null"
15 mod
=$
(git ls-files
-m .. |
grep ".*\.[ch]")
20 $checkpatch $file > "$file"_cp
2> /dev
/null
23 $checkpatch $file > "$file"_cp
2> /dev
/null
25 for file in f
1/*_cp
; do
26 diff $file f
2/$
(basename $file) |
grep -A3 "ERROR\|WARNING"