summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-02-23 16:16:30 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-02-23 16:16:30 +0100
commit513e922309f4f83db5094354f6ffbc6cdd984d47 (patch)
tree7ec2a9f49defb38d1011a47acbe2fc0196f01514 /tools
parentMerge pull request #1723 from chiragshah6/ospf_vrf_dev (diff)
downloadfrr-513e922309f4f83db5094354f6ffbc6cdd984d47.tar.xz
frr-513e922309f4f83db5094354f6ffbc6cdd984d47.zip
tools: fix that filters issues on resulting file only
Because checkpatch result is applied to original and new file, the analysis also parses what may be wrong with the original file. Whereas the script should limit to analyse only what is wrong on new file. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/checkpatch.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh
index f55692096..73421784f 100755
--- a/tools/checkpatch.sh
+++ b/tools/checkpatch.sh
@@ -72,7 +72,7 @@ else
echo "Report for $(basename $file _cp)" 1>&2
echo "===============================================" 1>&2
if [ -a /tmp/f2/$(basename $file) ]; then
- diff $file /tmp/f2/$(basename $file) | grep -v "normally be const" | grep -A3 "ERROR\|WARNING" 1>&2
+ diff $file /tmp/f2/$(basename $file) | grep -v "normally be const" | grep -A3 "ERROR\|WARNING" | grep -A2 -B2 '/tmp/f1' 1>&2
else
cat $file | grep -v "normally be const" | grep -A3 "ERROR\|WARNING" 1>&2
fi