Reference

Configuration

A .dollarlint.toml config is recommended for projects, but not required. Directory validation searches the target root; explicit file validation searches beside the file. Each run uses one config by default; set configs.mode = "nearest" to let nested .dollarlint.toml files apply to their subtrees. Use --config to point at one explicit config for the whole run.

Starter config

# dollarlint configuration
version = 1

[configs]
mode = "single"

[discovery]
exclude = []
useDefaultExcludes = true
respectGitIgnore = true
forceExclude = false
followSymlinks = false

[parsing.json]
mode = "auto"

[schemas]
maxDepth = 8
concurrency = 8
requireCoverage = false

[schemas.optimizations]
enabled = true

[schemas.optimizations.azure]
pruneResources = true

[schemas.fetch]
enabled = true
cache = true
timeout = "10s"
retries = 2
retryMinWait = "250ms"
retryMaxWait = "2s"
allowedDomains = []
blockedDomains = []

[schemas.compile]
timeout = "30s"

[schemas.catalogs]
enabled = true
failure = "warn"
match = "auto"

[[schemas.catalogs.sources]]
name = "schemastore"
format = "schemastore"
url = "https://www.schemastore.org/api/json/catalog.json"
enabled = true

[[schemas.catalogs.sources]]
name = "rubyschema"
format = "rubyschema"
enabled = true

# [[schemas.catalogs.ignore]]
# file = "data/tasks.json"
# reason = "application data, not a tool config"

# [[schemas.associations]]
# file = "settings/*.toml"
# schema = "./schemas/settings.schema.json"

[output]
showSkipped = false
verbose = false
quiet = false
locations = false
branchErrors = "best"
issueHints = "auto"

# [[ignore]]
# file = "fixtures/*.json"
# keyword = "required"
# property = "legacyName"
# reason = "legacy fixture kept for compatibility"

Format and output file are per-run choices — use --format and --output on dollarlint validate whenever you need JSON, SARIF, or a file artifact.

Config selection

Key Purpose
extendsOptional path to another .dollarlint.toml to inherit from. Relative paths resolve from the current config file.
configs.modeUse single for one config per run, or nearest to apply nested configs to their subtrees during a parent-directory run.

Discovery

Leave include unset to use the built-in JSON, JSONC, JSON5, JSON Lines, YAML, YML, and TOML discovery defaults. Set it only when you want to replace that default set with custom discovery globs.

Discovery, exclude, association, and ignore-file globs in config are matched against slash-separated paths relative to the config file's directory. CLI globs are relative to the validation root. A glob without a slash matches basenames at any depth, so *.json matches both package.json and config/settings.json. Use slashes when you want to match a particular relative path shape.

Key Purpose
includeOptional replacement discovery globs to consider. Leave unset for built-in defaults; set to an empty list only to discover no files. Repeatable CLI includes replace config includes for that run.
excludeAdditional discovery globs to ignore, on top of the built-in default excludes.
useDefaultExcludesSkip common VCS, dependency, generated, cache, and virtual environment directories.
respectGitIgnoreApply .gitignore patterns during directory discovery, including nested .gitignore files as the walk descends.
forceExcludeApply excludes even to explicitly passed files. By default, explicit file targets bypass excludes.
followSymlinksFollow symbolic links during discovery.

Default excludes are intentionally not written out by dollarlint init. Keep project-specific ignores in exclude.

Relative schema paths in associations and local catalog source paths are resolved from the directory containing .dollarlint.toml.

Nested configs

Set configs.mode = "nearest" in the run root config when a parent-directory run should apply nested .dollarlint.toml files. Each file uses the closest config at or above its directory. A nested config does not inherit parent settings unless it declares extends.

[configs]
mode = "nearest"

# in packages/api/.dollarlint.toml
extends = "../../.dollarlint.toml"

Passing --config keeps single-config behavior for that run and suppresses nested config discovery.

Parsing

JSON parsing defaults to auto: .json files are parsed as strict JSON first, then retried as JSONC when strict parsing fails, so comments and trailing commas work in projects whose existing tools accept them. Files ending in .jsonc always use JSONC parsing.

Key Purpose
parsing.json.modeChoose auto, strict, or jsonc for files ending in .json.

Schemas

Key Purpose
maxDepthMaximum external schema reference depth.
concurrencyNumber of concurrent validation workers. Defaults to GOMAXPROCS.
requireCoverageFail when a discovered included file has no in-file schema, config association, built-in association, or catalog match.

Associations

Associations map discovered files to schemas when the file does not declare one itself. DollarLint also has a built-in association for .dollarlint.toml, backed by the embedded config schema; explicit in-file declarations and user associations still win.

[[schemas.associations]]
file = "settings/*.toml"
schema = "./schemas/settings.schema.json"

Association globs in config are matched relative to the config file's directory and use the same basename-any-depth behavior as discovery globs. In-file declarations win over associations.

Fetch and compile

Key Purpose
schemas.fetch.enabledAllow fetching HTTP schemas and catalogs.
schemas.fetch.cacheCache successful remote schemas and catalogs on disk for repeat runs.
schemas.fetch.timeoutTimeout for each schema fetch.
schemas.fetch.retriesRetries for transient remote schema fetch failures. 408, 425, 429, and retryable 5xx responses are retried.
schemas.fetch.retryMinWaitMinimum retry backoff.
schemas.fetch.retryMaxWaitMaximum retry backoff.
schemas.fetch.allowedDomainsRestrict remote schemas to exact or wildcard hosts. For SchemaStore, use *.schemastore.org or include both www.schemastore.org and json.schemastore.org. For RubySchema, include www.rubyschema.org.
schemas.fetch.blockedDomainsDeny hosts even when they match the allowlist.
schemas.compile.timeoutTimeout for compiling each schema.

Optimizations

Optimizations reduce expensive schema work without changing validation semantics. They are enabled by default and can be turned off globally or one optimization at a time when you need to debug schema behavior exactly as fetched.

Key Purpose
schemas.optimizations.enabledEnable or disable schema-specific optimizations as a group.
schemas.optimizations.azure.pruneResourcesFor Azure Resource Manager deployment schemas from schema.management.azure.com, compile only the resource provider schemas referenced by ARM templates instead of the full Azure provider catalog. For deployment parameter files, compile only the template definitions needed for parameter values and Key Vault references. This keeps ordinary ARM template and parameter validation much faster. Set it to false if you need to inspect or debug the unpruned Azure schema.

Catalogs

Catalogs map well-known filenames to schemas when a file doesn't declare $schema and no explicit or built-in association matches. SchemaStore and RubySchema are built-in catalog sources, and custom sources can use the same catalog shape as SchemaStore. Explicit in-file schemas still report schema load or compile failures as issues; the catalog failure policy only applies to catalog loading and catalog-inferred schemas.

The default config includes the SchemaStore and RubySchema sources but keeps catalog matching disabled until you enable schemas.catalogs.enabled or pass --catalogs. The generated config from dollarlint init enables both sources by default.

When the built-in SchemaStore source is enabled, DollarLint adds a small curated layer for known filename gaps and drift. The current curated associations cover rustfmt.toml / .rustfmt.toml, release-plz.toml / .release-plz.toml, and .NET's launchSettings.json / Properties/launchSettings.json.

The built-in RubySchema source covers common Ruby and Rails project configs. Ambiguous Rails and Ruby filenames require nearby project evidence, so they can be reported as skipped catalog candidates instead of guessed blindly.

Catalog matches are reported with schemaMatch metadata in JSON output and with explanatory text hints for catalog-sourced issues. When the inferred schema is correct, add the suggested [[schemas.associations]] rule to make it explicit. When a file should never be inferred from a catalog, use schemas.catalogs.ignore.

Recognized config files without a usable built-in or catalog schema are reported with schemaGap metadata. This marks known high-signal gaps such as netlify.toml, .cargo/config.toml, .terraform-docs.yml, and .asf.yaml without pretending DollarLint has a schema for them.

Key Purpose
schemas.catalogs.enabledEnable catalog filename matching.
schemas.catalogs.failureChoose warn, error, or skip when a catalog cannot be loaded or a catalog-inferred schema cannot be loaded or compiled.
schemas.catalogs.matchChoose auto to skip low-confidence generic bare filenames like tasks.json, or all to apply every catalog filename match.
schemas.catalogs.sourcesList built-in and SchemaStore-format catalog sources.
schemas.catalogs.sources[].nameHuman-readable source name used in schema source metadata and warnings.
schemas.catalogs.sources[].formatCatalog format. Use schemastore for SchemaStore-shaped JSON catalogs or rubyschema for the built-in RubySchema source.
schemas.catalogs.sources[].urlRemote catalog URL for schemastore sources. Mutually exclusive with path.
schemas.catalogs.sources[].pathLocal catalog path for schemastore sources. Mutually exclusive with url.
schemas.catalogs.sources[].enabledDisable one source without deleting it.
schemas.catalogs.ignoreList file globs that should not receive catalog-inferred schemas. Explicit in-file schemas and configured associations still take precedence.
schemas.catalogs.ignore[].fileFile glob for a catalog inference opt-out.
schemas.catalogs.ignore[].reasonOptional explanation shown with the skipped catalog decision.

Ignore rules

[[ignore]]
file = "fixtures/*.json"
keyword = "required"
schemaSource = "config-association"
property = "legacyName"
reason = "legacy fixture kept for compatibility"

Ignore rules match validation issues by file glob, JSON Schema keyword, schema source, and property. All configured fields must match; omitted fields act like wildcards. Ignored issues are still reported as ignored and do not make the run fail.

Output preferences

Config can set issue-reporting and text-output preferences. Machine-readable formats and output files are intentionally per-run choices.

Key Purpose
output.showSkippedShow skipped files in text output, grouped by reason, class, and coverage signal. Large low-signal groups are summarized in text; JSON output keeps every skipped file.
output.verboseShow expanded issue metadata in text output.
output.quietUse terse success output and omit warnings, skipped-file listings, and summary details from failing text output.
output.locationsInclude line and column positions in text output. JSON and SARIF request source locations automatically.
output.branchErrorsChoose best to report the closest matching oneOf/anyOf branch, or all to show every failed branch leaf when debugging complex schemas.
output.issueHintsChoose auto for curated hints, off for raw issues only, or verbose to include hint rule IDs, confidence, and source links in text output.