feat: do not run structure checks on news/newsletters

This commit is contained in:
Darragh Elliott committed 2026-04-22 12:31:53 +00:00
1 parent 5314659ac7
commit 964b7f206a
1 file changed
+3 -1
@@ -5,6 +5,7 @@
"""Check that the passed files match xml structure across languages."""
import logging
import re
from collections import defaultdict
from typing import TYPE_CHECKING
@@ -59,7 +60,8 @@ def check(files: list[Path], pool: multiprocessing.pool.Pool) -> tuple[bool, str
"//track/@srclang", # Languages, used in some track elements
}
groups: defaultdict[tuple[Path, str], list[Path]] = defaultdict(list)
for file in files:
forbidden_fileregex = re.compile(r"^fsfe\.org/news/([0-9]{4}|nl)/.*")
for file in [file for file in files if not forbidden_fileregex.match(str(file))]:
path = file.resolve()
groups[(get_basepath(path), path.suffix)].append(path)