require-valid-repository-hook-version
Require repository hook configuration files to declare version: 1.
Rule catalog ID: R056
Targeted pattern scopeâ
.github/hooks/**/*.json
What this rule reportsâ
- hook configuration files with a missing
version - hook configuration files whose
versionis not exactly1
Why this rule existsâ
Repository hook files use an explicit versioned JSON schema. Requiring the documented version: 1 value catches incompatible or incomplete hook files early.
â Incorrectâ
{ "version": 2, "hooks": {} }
â Correctâ
{ "version": 1, "hooks": {} }