fleetlint Policy for a fleet of repositories
v0.8
Getting started

hooks/config-present

Git hooks are configured

Severityerror
Tiers1, 2
Stacksany
Scoperoot
Kindexpr
Sourcelibrary v0.5.0
Selected byfleetlint-minimal@v0.5.0

Requirement

The repository declares git hooks that run on every commit: a .pre-commit-config.yaml (pre-commit or prek) or a lefthook configuration (lefthook.yml, .lefthook.yml and their YAML, TOML and JSON variants).

Why

Hooks are the only gate that runs before code reaches the remote; everything else is after the fact.

Check

[".pre-commit-config.yaml", "lefthook.yml", "lefthook.yaml", "lefthook.toml", "lefthook.json", "lefthook.jsonc",
 ".lefthook.yml", ".lefthook.yaml", ".lefthook.toml", ".lefthook.json", ".lefthook.jsonc"].exists(f, file(f))

Fix

Run fleetlint fix --apply to add .pre-commit-config.yaml for the stack, then prek install (the file uses prek’s builtin hooks; pre-commit cannot run it).

Agent instruction: Create .pre-commit-config.yaml from the shared template plus the stack block, run prek update and prek install.

fleetlint fix can apply this rule’s fix automatically (1 action(s)).

A finding of this rule points at .pre-commit-config.yaml.

Sources


Generated by fleetlint docs from catalog v0.5.0.