This repository was archived by the owner on Apr 21, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvalidate-markdown.sh
More file actions
executable file
·56 lines (45 loc) · 1.57 KB
/
validate-markdown.sh
File metadata and controls
executable file
·56 lines (45 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
# Simple markdown validation script
echo "Validating markdown files..."
FILES=(
"src/mcp-context-server/context-store/uiforge-webapp.md"
"src/mcp-context-server/context-store/uiforge-mcp.md"
"src/mcp-context-server/context-store/forge-patterns.md"
"src/mcp-context-server/context-store/mcp-gateway.md"
)
ISSUES_FOUND=0
for file in "${FILES[@]}"; do
if [ -f "$file" ]; then
echo "Checking $file..."
# Check for common issues
if grep -n "^##[^#].*$" "$file" > /dev/null; then
echo " ⚠️ Found heading without blank line before"
((ISSUES_FOUND++))
fi
if grep -n "^###.*$" "$file" | grep -v "^### $" > /dev/null; then
echo " ⚠️ Found heading without blank line before"
((ISSUES_FOUND++))
fi
if grep -n "^- [^#].*$" "$file" | head -5 > /dev/null; then
echo " ⚠️ Found list without blank line before"
((ISSUES_FOUND++))
fi
if grep -n "^[^[:space:]].*https://[^[:space:]]*$" "$file" > /dev/null; then
echo " ⚠️ Found bare URL"
((ISSUES_FOUND++))
fi
echo " ✅ Basic structure validation passed"
else
echo " ❌ File not found: $file"
((ISSUES_FOUND++))
fi
done
echo ""
echo "Validation complete. Issues found: $ISSUES_FOUND"
if [ $ISSUES_FOUND -eq 0 ]; then
echo "🎉 All markdown files look good!"
exit 0
else
echo "⚠️ Some issues found. Consider manual review."
exit 1
fi