From 513e922309f4f83db5094354f6ffbc6cdd984d47 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Fri, 23 Feb 2018 16:16:30 +0100 Subject: 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 --- tools/checkpatch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/checkpatch.sh') 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 -- cgit v1.2.3