Output Formats
Available Formats
Section titled “Available Formats”| Format | Flag | Use Case |
|---|---|---|
| Table | -f table |
Default human-readable output |
| JSON | -f json |
CI integration, programmatic processing |
| YAML | -f yaml |
Config-as-code pipelines |
| CSV | -f csv |
Spreadsheet import, data analysis |
| Markdown | -f markdown |
GitHub comments, PR reviews |
| SARIF | -f sarif |
GitHub Code Scanning, Azure DevOps |
| Quiet | -f quiet |
Summary only, no code in errors |
JSON Output
Section titled “JSON Output”md-go-validator -f json -o results.json .The JSON output includes:
file: source file pathlineNumber: 1-based line number of the code blockblockIndex: 1-based index within the filelanguage: detected languagestatus:valid,error, orskippederrorCode:syntax,not_available,not_registered, orunknownerror: error message (when status is error)
The JSON schema is documented in docs/json-schema.json.
SARIF Output
Section titled “SARIF Output”md-go-validator -f sarif -o results.sarif .SARIF (Static Analysis Results Interchange Format) is supported by GitHub Code Scanning. Upload results in your CI workflow:
- uses: github/codeql-action/upload-sarif@v3 with: sarif_file: results.sarifWriting to File
Section titled “Writing to File”Use -o to write output to a file:
md-go-validator -f json -o results.json .md-go-validator -f sarif -o results.sarif .Color Control
Section titled “Color Control”md-go-validator --color auto . # Default: detect terminalmd-go-validator --color always . # Force colorsmd-go-validator --color never . # Disable colorsSee Also
Section titled “See Also”- CI Integration for pipeline setup
- CLI Options for all flags