HookFunctions: Made #ifndef/#define check tolerant to namespaces

This commit is contained in:
Will Bainbridge
2018-06-20 16:08:37 +01:00
parent f29114bfb6
commit 28552e155d

View File

@ -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