Skip to content

cofferdam.toml reference

Every key cofferdam reads. Generated from the loader's own schema, so it cannot fall out of step with what the binary accepts.

A key that appears in no section below is ignored. Cofferdam says so when it loads the file — an unknown key used to parse cleanly and do nothing, which made a typo indistinguishable from a rule that simply never matched.

Exclusion is not configured here: it is a discovery-time decision and lives in .cofferdamignore or .gitignore. To turn a check off over a path glob without removing the file from analysis, use [[overrides]] with disabled = true.

Top level

Keys written at the root of the file, before any table header.

KeyTypeDefaultMeaning
pluginsarray of paths[]Node plugin modules implementing the @cofferdam/check-sdk defineCheck shape. Paths resolve relative to this file's directory.
checkstablePer-check configuration. See the section below.
layerstableArchitectural layers for Design.LayerViolation. See the section below. cofferdam.invariants.toml is the preferred home; when both files declare [layers], that one wins and cofferdam prints a hint.
enginetableEngine-level toggles. See the section below.
budgetstableCaps on finding counts. See the section below.
overridesarray of tables[]Per-path-glob check configuration. See the section below.
context_suppressarray of tables[]Suppression of noisy cofferdam context digest items. See the section below.

[checks."Category.Name"]

One block per check. Option names come from that check's own schema — run cofferdam explain <id> to see them — so cofferdam cannot list them here. Two keys are common to every check.

Keys are chosen by you — each is a check id.

KeyTypeDefaultMeaning
severitystringOverride the check's default severity: info, low, medium, high or critical.
enabledboolPassed to the check as an option. Only Refactor.PurityHeuristic declares it (as its opt-in switch); for every other check it is accepted and ignored. To turn a check off over a path glob, use [[overrides]] with disabled = true.

[layers]

Layer name → array of globs. The reserved sub-table [layers.allow] maps each layer to the layers it may import from; an empty array means an isolated layer, and a layer absent from allow may import from anything.

Keys are chosen by you — each is a layer name (or the reserved allow).

[engine]

Engine-level toggles.

KeyTypeDefaultMeaning
type_awarebooltrueSet false to force-disable type-aware checks even when one is registered, so CI machines without Node pay no type-host cost and see no warning.
extra_extensionsarray of strings[]Extensions to walk beyond the built-in set, e.g. ["md", "mdx"]. Leading dots are stripped; empty entries ignored.

[budgets]

Check id or category name → maximum finding count. Counted including baselined findings: a budget is a cap on total debt, not a CI-gate exemption.

Keys are chosen by you — each is a check id or category name.

[[overrides]]

Repeatable. Each block narrows check configuration to a set of path globs.

KeyTypeDefaultMeaning
pathsarray of globs[]Files this block applies to. Gitignore-style globs, matched against project-relative paths.
checkstableCheck id → the same option table a top-level [checks."X.Y"] block takes, plus disabled = true to turn the check off for these paths.

[[context_suppress]]

Repeatable. Each block suppresses one cofferdam context provider on a set of paths.

KeyTypeDefaultMeaning
check_idstringThe Context.* provider to suppress. Required.
pathsarray of globs[]Files to suppress it on. Omit for the wildcard form — suppress everything this provider emits.
reasonstringWhy. Not enforced, but cofferdam context --lint-context-suppress reports rules that no longer match anything, and a reason is what makes the report actionable.

MIT License