Documentation
¶
Overview ¶
Package hookcmd implements the `fendix hook …` cobra subcommand tree (90-day cut, item 2). It installs a git pre-commit hook that runs a fast, staged, diff-aware scan on every commit — the second half of the "runs on every commit" developer-workflow story, after `fendix scan --diff --staged` (item 1).
fendix hook install — write .git/hooks/pre-commit fendix hook uninstall — remove the fendix-managed hook fendix hook status — report whether the hook is installed
The installed hook runs:
fendix scan --code . --staged --fast --fail-on <severity>
--staged scopes the scan to the index and --fast skips Semgrep and native dependency scanners. Known product defect: because --code auto-enables the Python phase, the generated command is not currently native-only and can run the Python deps check. A finding at or above --fail-on aborts the commit only when the decision policy stamps it BLOCK; the developer fixes it (or bypasses with `git commit --no-verify`).
Safety: install refuses to clobber a pre-existing non-fendix pre-commit hook unless --force is passed, and never silently overwrites the user's own automation. The hook is marked with a sentinel comment so status / uninstall can recognise it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.