require-repository-hooks-object
Require repository hook configuration files to declare a top-level hooks object.
Rule catalog ID: R057
Targeted pattern scopeâ
.github/hooks/**/*.json
What this rule reportsâ
- hook configuration files with a missing top-level
hooksobject - hook configuration files whose
hooksvalue is not a JSON object
Why this rule existsâ
The hook schema centers on a top-level hooks object keyed by event name. Without that object, the file cannot declare event-specific hook arrays in the documented structure.
â Incorrectâ
{ "version": 1 }
â Correctâ
{ "version": 1, "hooks": {} }