From fc76388a3e53fdffd1337a8f9ad05f886ee8f232 Mon Sep 17 00:00:00 2001 From: Adrien Ufferte Date: Mon, 9 Jun 2025 13:17:54 +0200 Subject: [PATCH] Detect loop variables in naming check --- .github/scripts/check_gd_nomenclature.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/scripts/check_gd_nomenclature.py b/.github/scripts/check_gd_nomenclature.py index f164ee32..010c6214 100644 --- a/.github/scripts/check_gd_nomenclature.py +++ b/.github/scripts/check_gd_nomenclature.py @@ -60,6 +60,11 @@ for root, dirs, files in os.walk('.', topdown=True): name = m.group(1) if not SNAKE_CASE.match(name): issues.append((path, idx, 'signal', name)) + m = re.match(r"for\s+([A-Za-z0-9_]+)(?:\s*:\s*[^\s]+)?\s+in\b", stripped) + if m: + name = m.group(1) + if not SNAKE_CASE.match(name): + issues.append((path, idx, 'variable', name)) if issues: print('GDScript naming issues found:')