CLI Options
| Flag | Short | Description |
|---|---|---|
--verbose |
-v |
Show progress for each code block |
--quiet |
-q |
Only show summary (no code in errors) |
--no-code |
Do not show code snippets in error output | |
--language |
-l |
Comma-separated list of languages to validate |
--format |
-f |
Output format (table, json, markdown, yaml, csv, quiet, sarif) |
--color |
Color mode (auto, always, never) | |
--output |
-o |
Write output to file |
--timeout |
-t |
Timeout for validation (e.g. 30s, 5m) |
--exclude |
Glob pattern to exclude (repeatable, supports **) |
|
--skip-directive |
Custom skip directive (repeatable) | |
--init |
Create a default .md-go-validator.yaml config file |
|
--baseline |
Baseline file of known errors; only new errors fail | |
--save-baseline |
Generate baseline file from current run’s errors | |
--config |
Path to config file (default: auto-discover in CWD) | |
--list-languages |
List all supported languages | |
--fail-on-skipped |
Exit 1 if any blocks are skipped | |
--help |
-h |
Show help message |
--version |
-V |
Show version information |
Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
0 |
Success — all code blocks valid or skipped |
1 |
Validation errors — one or more code blocks have syntax errors |
2 |
Tool error — file not found, bad flags, I/O errors |
Examples
Section titled “Examples”Basic Usage
Section titled “Basic Usage”md-go-validator . # Validate current directorymd-go-validator README.md # Validate a single filemd-go-validator docs/ README.md # Validate multiple pathsLanguage Selection
Section titled “Language Selection”md-go-validator -l go . # Go only (default)md-go-validator -l go,typescript . # Go and TypeScriptmd-go-validator -l go,ts,rs . # Short formsOutput Control
Section titled “Output Control”md-go-validator -f json -o out.json . # JSON to filemd-go-validator -f sarif . # SARIF formatmd-go-validator -q . # Quiet modemd-go-validator -v . # Verbose modeExcluding Files
Section titled “Excluding Files”md-go-validator --exclude "vendor/**" --exclude "node_modules/**" .Timeout
Section titled “Timeout”md-go-validator -t 30s . # 30 second timeoutmd-go-validator -t 5m . # 5 minute timeoutRead markdown from stdin with -:
cat README.md | md-go-validator -See Also
Section titled “See Also”- Configuration File for YAML-based defaults
- Skip Directives for excluding specific blocks
- Baseline Mode for incremental adoption