Skip to content

Configuration

driftcheck is configured via a .driftcheck.toml file in the repository root.

Generate a Config

driftcheck --init

Creates a .driftcheck.toml with example configuration.

Options

[driftcheck]
# Exclude specific detectors (supports short names or drift keys)
exclude_detectors = ["lockfile", "nvmrc", "ci_os"]

# Treat informational drifts as blocking
fail_on_informational = false

# Custom doc paths — additional files to scan for version mentions
# Supports glob patterns (e.g., "docs/*.md")
doc_paths = ["docs/setup.md", "CHANGELOG.md"]

Detector Exclusion

Exclude specific detectors by short name or full key:

exclude_detectors = ["rust_drifts", "node", "lockfile"]

Short names work too — "rust" matches "rust_drifts", "node" matches "node_drifts".

Doc Paths

By default driftcheck scans: - README.md, README-*.md, README_*.md - CONTRIBUTING.md, CONTRIBUTING-*.md - docs/README*.md

Add custom paths:

doc_paths = [
    "docs/setup.md",
    "docs/getting-started.md",
    "CHANGELOG.md",
    "wiki/*.md",          # glob patterns supported
]

Informational Drifts

Some detectors (lockfile presence, CI OS, nvmrc mismatch) are informational by default. To promote them to blocking:

fail_on_informational = true

Or via CLI:

driftcheck --fail-on-informational

Runtime Overrides

CLI flags override .driftcheck.toml:

driftcheck --only rust-cargo,node           # override exclude_detectors
driftcheck --exclude lockfile,nvmrc   # add to excluded list
driftcheck --fail-on-informational    # promote informational drifts

Full Example

[driftcheck]
exclude_detectors = ["ci_os_drifts", "nvmrc_drifts", "lockfile_drifts"]
fail_on_informational = false
doc_paths = [
    "docs/setup.md",
    "docs/installation.md",
    "CHANGELOG.md",
]