diff --git a/scripts/validate_architecture.py b/scripts/validate_architecture.py index 2f49035a..cb4cdf42 100755 --- a/scripts/validate_architecture.py +++ b/scripts/validate_architecture.py @@ -2515,9 +2515,11 @@ class ArchitectureValidator: # NAM-004: Check for 'shop_id' (should be vendor_id) # Skip shop-specific files where shop_id might be legitimate + # Use word boundary to avoid matching 'letzshop_id' etc. + shop_id_pattern = re.compile(r'\bshop_id\b') if "/shop/" not in str(file_path): for i, line in enumerate(lines, 1): - if "shop_id" in line and "# noqa" not in line.lower(): + if shop_id_pattern.search(line) and "# noqa" not in line.lower(): # Avoid false positives for legitimate shop context if "shop_service" not in str(file_path): self._add_violation(