Config — .metis.toml Reference

.metis.toml drives every check. It is generated by metis init and read by every subcommand.

Example

[project]
name = "my-project"

[[checks]]
name = "clang-format"
command = "clang-format"
args = ["-i", "--fallback-style=google", "-style=file"]
patterns = ["*.cpp", "*.hpp", "*.h", "*.cc"]

[exclude]
paths = ["build/", "third_party/", ".git/"]

[output]
local_hook = true        # install the git hook
github_actions = false   # also write .github/workflows on install

[execution]
parallel = true

Sections

[project]
name — project name.
[[checks]]
name (unique), description, enabled (false skips the check), command, args, patterns (glob matched against file paths), timeout (seconds), severity (error/warning/info). Checks run in parallel; output is serialized.
[exclude]
paths matched as prefix, exact, or *.ext glob.
[output]
local_hook, github_actions, gitlab_ci. generate-gha/generate-gitlab write workflows regardless of [output].

grep/rg checks: exit code 1 (no match) counts as pass, so a grep -E "[[:space:]]+$" trailing-whitespace check fails only on a match.

Test Config

[test]
build_dir = "build"
coverage = false
line_threshold = 80.0
branch_threshold = 70.0
function_threshold = 90.0

build_dir is the CMake build directory for ctest. Thresholds are minimum percentages; the check fails if any metric falls below.

Sanitizer Config

[sanitizers]
enabled = false
types = ["address", "undefined"]
build_dir = "build"
timeout = 0

types accepts address, undefined, thread, leak. timeout is max seconds per test (0 = no limit).

Perf Config

[perf]
enabled = false
build_dir = "build"
binary_path = ""
max_binary_size_mb = 0
max_build_time_sec = 0
benchmark_regex = ""

Each perf check activates only when its threshold/target is set. See the perf page for exit codes.