From: Quentin Young Date: Fri, 23 Feb 2018 16:21:42 +0000 (-0500) Subject: Merge branch 'master' into stylechecker X-Git-Tag: frr-5.0-dev~214^2 X-Git-Url: https://git.proxmox.com/?p=mirror_frr.git;a=commitdiff_plain;h=6b1ebf3c3c8270fa8cf8a59b3204652add55e383 Merge branch 'master' into stylechecker --- 6b1ebf3c3c8270fa8cf8a59b3204652add55e383 diff --cc tools/checkpatch.sh index 930c8e2df,73421784f..e6110f0c7 --- a/tools/checkpatch.sh +++ b/tools/checkpatch.sh @@@ -69,20 -69,15 +69,20 @@@ els done echo "Done." for file in /tmp/f1/*_cp; do - echo "Report for $(basename $file _cp)" 1>&2 - echo "===============================================" 1>&2 if [ -a /tmp/f2/$(basename $file) ]; then - result=$(diff $file /tmp/f2/$(basename $file) | grep -A3 "ERROR\|WARNING") - diff $file /tmp/f2/$(basename $file) | grep -v "normally be const" | grep -A3 "ERROR\|WARNING" | grep -A2 -B2 '/tmp/f1' 1>&2 ++ result=$(diff $file /tmp/f2/$(basename $file) | grep -A3 "ERROR\|WARNING" | grep -A2 -B2 '/tmp/f1') else - result=$(cat $file | grep -A4 "ERROR\|WARNING") - cat $file | grep -v "normally be const" | grep -A3 "ERROR\|WARNING" 1>&2 ++ result=$(cat $file | grep -A3 "ERROR\|WARNING" | grep -A2 -B2 '/tmp/f1') fi if [ "$?" -eq "0" ]; then - stat=1 + echo "Report for $(basename $file _cp)" 1>&2 + echo "===============================================" 1>&2 + echo "$result" 1>&2 + if echo $result | grep -q "ERROR"; then + stat=2 + elif [ "$stat" -eq "0" ]; then + stat=1 + fi fi done fi