rsyslog/.codex/config.toml
Rainer Gerhards 7ab72b6f58 devtools: add repo-local Codex commit hook
Add a repo-local Codex hook setup under `.codex/` so trusted Codex
users get pre-commit guardrails automatically in this repository.

The hook intercepts Bash-based `git commit` tool calls and first runs
the deterministic repo-policy focus checks against the staged commit
snapshot so invariant violations are reported before formatting.

If those checks pass, the hook runs
`./devtools/format-code.sh --git-changed`, skips unrelated Git commands,
allows commits when `clang-format-18` is unavailable, skips formatting
when no tracked `.c` or `.h` files changed, and blocks partial-staging
cases or real formatter failures.

When formatting changes files, the hook re-stages only the tracked files
that were already part of the pending commit.

Add `devtools/list-git-changed-c-h-files.sh` so the hook and formatter
share one source of truth for tracked changed `.c` and `.h` files.

With the help of AI-Agents: Codex
2026-03-28 14:10:06 +01:00

3 lines
30 B
TOML

[features]
codex_hooks = true