diff --git a/tools/toolkit-qa-check.sh b/tools/toolkit-qa-check.sh index 3b9e05e..44c3219 100755 --- a/tools/toolkit-qa-check.sh +++ b/tools/toolkit-qa-check.sh @@ -966,15 +966,15 @@ echo "" # Check for menus with inconsistent back buttons while IFS=: read -r file line_num line_content; do - # Look for menu functions (show_*_menu) - if echo "$line_content" | grep -qE 'show_.*_menu\(\)|handle_.*_menu\(\)'; then + # Look for menu display functions (show_*_menu only, not handle_*_menu handlers) + if echo "$line_content" | grep -qE 'show_.*_menu\(\)'; then menu_file="$file" # Check if this file has proper back button (within next 100 lines) has_back=0 line_count=0 while IFS= read -r check_line && [ "$line_count" -lt 100 ]; do - if echo "$check_line" | grep -qE '\$\{RED\}0\)\$\{NC\}.*(Back to Main Menu|Exit)'; then + if echo "$check_line" | grep -qE '\$\{RED\}0\)\$\{NC\}.*(Back|Exit)'; then has_back=1 break fi @@ -986,7 +986,7 @@ while IFS=: read -r file line_num line_content; do count_issue "LOW" fi fi -done < <(grep -rn 'show_.*_menu()\|handle_.*_menu()' "$TOOLKIT_PATH" --include="*.sh" 2>/dev/null) +done < <(grep -rn 'show_.*_menu()' "$TOOLKIT_PATH" --include="*.sh" 2>/dev/null) # Check for inconsistent separators in menus while IFS=: read -r file line_num line_content; do