Skip to content

Quick Start

The most common usage is to validate all code blocks in your project:

Terminal window
md-go-validator .

This scans all .md, .markdown, and .mdx files recursively and validates Go code blocks by default.

Terminal window
md-go-validator README.md docs/
Terminal window
# Validate Go and TypeScript
md-go-validator -l go,typescript .
# Validate all supported languages
md-go-validator -l go,templ,typescript,nix,rust,hcl .

Add to your GitHub Actions workflow:

name: Validate Docs
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- run: go install github.com/larsartmann/md-go-validator@latest
- run: md-go-validator -f json -o results.json .
Terminal window
cat README.md | md-go-validator -
Terminal window
md-go-validator -f table . # Default: human-readable table
md-go-validator -f json . # JSON for CI integration
md-go-validator -f sarif . # SARIF for GitHub Code Scanning
md-go-validator -f quiet . # Summary only, no code in errors