HookFunctions: Made #ifndef/#define check tolerant to namespaces
This commit is contained in:
@ -363,7 +363,8 @@ checkHeaderIfndefNames()
|
|||||||
fileName=$(basename $f)
|
fileName=$(basename $f)
|
||||||
correctMangledName=$(basename $f | sed 's=\.=_=')
|
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
|
then
|
||||||
echo "Updated #ifndef/#define for: $f" 1>&2
|
echo "Updated #ifndef/#define for: $f" 1>&2
|
||||||
echo $f
|
echo $f
|
||||||
|
|||||||
Reference in New Issue
Block a user