Avoid mis-detecting NULL as part of other identifiers

Tighten the search for NULL in the code style check to avoid flagging
the use of MONITOR_DEFAULTTONULL (Win32 API constant) as violation.
This commit is contained in:
Vadim Zeitlin 2023-05-08 23:35:36 +01:00
parent 0da3f1c11f
commit 438da9c99a

View file

@ -88,7 +88,7 @@ jobs:
git fetch --depth=1 origin master
if git diff origin/master \
':**.h' ':**.cpp' \
| grep -E '^\+.*(wxOVERRIDE|wxNOEXCEPT|[^"_@]NULL[^"_])'; then
| grep -E '^\+.*(wxOVERRIDE|wxNOEXCEPT|[^"_@A-Za-z0-9]NULL[^"_A-Za-z0-9])'; then
echo "::error ::Please use C++11 equivalents of the deprecated macros in the new code."
exit 1
fi