Skip to content

Commit 61c69e9

Browse files
Create test.py
1 parent d53cabc commit 61c69e9

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

test.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""Some extra sanity checks for the CI."""
2+
3+
import sys
4+
from pathlib import Path
5+
6+
NEWS = Path(__file__).parent / "content" / "news"
7+
8+
for root, dirs, files in NEWS.walk():
9+
for name in files:
10+
f = root / name
11+
m = re.search(r"^Tags: (?P<tags>.*)$", f.read_text())
12+
if m and f.parent.name not in m.group("tags"):
13+
print(f"Tag from path must be repeated in Tags metadata: {f}")
14+
sys.exit(1)
15+

0 commit comments

Comments
 (0)