From 28552e155d04db0fe75be46adff3a723ec1a7313 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Wed, 20 Jun 2018 16:08:37 +0100 Subject: [PATCH] HookFunctions: Made #ifndef/#define check tolerant to namespaces --- bin/tools/HookFunctions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/tools/HookFunctions b/bin/tools/HookFunctions index 0cc068ff8..72e6d820c 100755 --- a/bin/tools/HookFunctions +++ b/bin/tools/HookFunctions @@ -363,7 +363,8 @@ checkHeaderIfndefNames() fileName=$(basename $f) correctMangledName=$(basename $f | sed 's=\.=_=') - if git grep -q -e "#ifndef.*_H" $scope"$f" && ! git grep -q -e "#ifndef[ ]\+$correctMangledName" $scope"$f" + if git grep -q -e "#ifndef.*_H" $scope"$f" && \ + ! git grep -q -e "#ifndef.*$correctMangledName" $scope"$f" then echo "Updated #ifndef/#define for: $f" 1>&2 echo $f