NAME

markdown-coverage-gate - require every tracked Markdown file to pass structural checks

PURPOSE

Measure Markdown file coverage across the repository and fail unless every tracked Markdown document is valid UTF-8, non-empty, headed, and has balanced fenced code blocks.

WHY IT EXISTS

Markdown documentation otherwise has no repository-wide gate. A newly added file can silently escape every documentation check, so the coverage denominator must be discovered from Git rather than maintained by hand.

WHEN TO USE

Run this gate whenever Markdown documentation is added, removed, renamed, or edited.

HOW TO USE

perl script/markdown-coverage-gate

Explicit files may be supplied for focused checks:

perl script/markdown-coverage-gate README.md docs/testing.md

WHAT USES IT

The Coverage GitHub Actions workflow runs this gate on pushes to master and pull requests.

EXAMPLES

A complete run prints a line such as:

Markdown coverage: 42/42 (100.0%)

Both ATX headings (# Heading) and Setext headings are accepted. Any structurally invalid Markdown file makes the process exit non-zero.