summaryrefslogtreecommitdiff
path: root/tools/checkpatch.sh
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-01-30 10:48:03 -0500
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-01-30 10:53:35 -0500
commit1e1c1e132b958bace6599d4c7a1159d398bae5d2 (patch)
tree3cec29ffb8376592b0e35ec13c61d1742f8f15ba /tools/checkpatch.sh
parentf5fd113cbf10269b8792cacb432ccf5e35ad900c (diff)
tools: return exit status in checkpatch.sh
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'tools/checkpatch.sh')
-rwxr-xr-xtools/checkpatch.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh
index 42ea8dbb38..3536df79a9 100755
--- a/tools/checkpatch.sh
+++ b/tools/checkpatch.sh
@@ -7,6 +7,7 @@ checkpatch="$tree/tools/checkpatch.pl --no-tree -f"
ignore="ldpd\|babeld"
cwd=${PWD##*/}
dirty=0
+stat=0
if [[ -z "$1" || -z "$2" ]]; then
echo "$usage"
@@ -66,6 +67,9 @@ else
else
cat $file | grep -v "normally be const" | grep -A3 "ERROR\|WARNING"
fi
+ if [ "$?" -eq "0" ]; then
+ stat=1
+ fi
done
fi
@@ -79,3 +83,5 @@ if [ $dirty -eq 1 ]; then
fi
git -C $tree config --unset gc.auto;
fi
+
+exit $stat