Guide

Examples

The repository includes local-schema, SchemaStore, and Azure ARM examples so you can test the main workflows without inventing fixtures from scratch.

Local schemas

dollarlint validate ./examples/basics --locations --show-skipped

The basics fixture includes valid and invalid JSON, YAML, and TOML files, plus one file without a schema to demonstrate skipped-file accounting. JSONC, JSON5, and JSON Lines work the same way when included in your own fixtures.

SchemaStore-backed files

dollarlint validate ./examples/schemastore --schema-store --locations

These examples cover common config files such as package.json, tsconfig.json, renovate.json, buf.yaml, and ruff.toml. Some declare schemas directly; catalog matching can infer schemas for conventional filenames.

Azure ARM templates

dollarlint validate ./examples/azure --locations

The Azure examples use real https://schema.management.azure.com schema URLs and exercise the Azure resource pruning optimization. The directory includes one intentionally invalid template. The default output reports the closest matching schema branch for that invalid storage account; set output.branchErrors = "all" if you want to inspect every failed Azure resource branch.

Machine-readable output

dollarlint validate ./examples/basics --format json --locations
dollarlint validate ./examples/basics --format sarif --output dollarlint.sarif

Use JSON when a script needs run summaries and issue metadata. Use SARIF when CI should upload code scanning results.