From 48e3bfec746eea78bc704400a98790df410ba725 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Mon, 30 Mar 2026 18:26:39 +0200 Subject: [PATCH] porting some grep checks from cmss (#17338) * porting some grep checks from cmss * . * Update validate_files.sh * Update validate_files.sh * Update validate_files.sh * Update validate_files.sh * not now.... * Update validate_files.sh --------- Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com> Co-authored-by: Cameron Lennox --- tools/ci/check_grep.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/ci/check_grep.sh b/tools/ci/check_grep.sh index de757b1fbea..8c3abee8a99 100644 --- a/tools/ci/check_grep.sh +++ b/tools/ci/check_grep.sh @@ -209,6 +209,20 @@ if $grep '\.proc/' $code_x_515 ; then FAILED=1 fi; +#part "var in proc args" +#if grep -P '^/[\w/]\S+\(.*(var/|, ?var/.*).*\)' $code_files; then +# echo +# echo -e "${RED}ERROR: changed files contains proc argument starting with 'var'.${NC}" +# FAILED=1 +#fi; + +part "unmanaged global vars" +if grep -P '^/*var/' $code_files; then + echo + echo -e "${RED}ERROR: Unmanaged global var use detected in code, please use the helpers.${NC}" + FAILED=1 +fi; + part "ambiguous bitwise or" if grep -P '^(?:[^\/\n]|\/[^\/\n])*(&[ \t]*\w+[ \t]*\|[ \t]*\w+)' $code_files; then echo