+ {{ pagination() }}
{% endblock %}
diff --git a/scripts/validate_architecture.py b/scripts/validate_architecture.py
index 61ada4fd..c784c9e5 100755
--- a/scripts/validate_architecture.py
+++ b/scripts/validate_architecture.py
@@ -442,6 +442,16 @@ class ArchitectureValidator:
def _check_pagination_macro_usage(self, file_path: Path, content: str, lines: list[str]):
"""FE-001: Check for inline pagination that should use macro"""
+ # Check if already using the pagination macro
+ uses_macro = any("from 'shared/macros/pagination.html'" in line for line in lines)
+ if uses_macro:
+ return
+
+ # Check for noqa: FE-001 comment
+ has_noqa = any("noqa: fe-001" in line.lower() for line in lines)
+ if has_noqa:
+ return
+
# Look for signs of inline pagination
pagination_indicators = [
('aria-label="Table navigation"', "Inline table navigation found"),
@@ -450,11 +460,6 @@ class ArchitectureValidator:
("goToPage(" , "Inline pagination controls found"),
]
- # Check if already using the pagination macro
- uses_macro = any("from 'shared/macros/pagination.html'" in line for line in lines)
- if uses_macro:
- return
-
for i, line in enumerate(lines, 1):
for pattern, message in pagination_indicators:
if pattern in line:
@@ -477,6 +482,11 @@ class ArchitectureValidator:
def _check_icon_helper_usage(self, file_path: Path, content: str, lines: list[str]):
"""FE-002: Check for inline SVGs that should use $icon() helper"""
+ # Check for noqa: FE-002 comment
+ has_noqa = any("noqa: fe-002" in line.lower() for line in lines)
+ if has_noqa:
+ return
+
# Pattern to find inline SVGs
svg_pattern = re.compile(r'', re.DOTALL | re.IGNORECASE)