Files
holocron/.pre-commit-config.yaml

55 lines
1.5 KiB
YAML

repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.2
hooks:
- id: gitleaks
stages: ['pre-commit']
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: shellcheck
args: [--severity=warning]
stages: ['pre-commit']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: end-of-file-fixer
stages: ['pre-commit']
- id: check-json
stages: ['pre-commit']
- id: pretty-format-json
stages: ['pre-commit']
- id: check-yaml
stages: ['pre-commit']
- id: trailing-whitespace
stages: ['pre-commit']
- repo: local
hooks:
- id: skill-frontmatter
stages: ['pre-commit']
name: SKILL.md frontmatter validation
description: Ensure SKILL.md files have required frontmatter fields
entry: bash
language: system
files: 'SKILL\.md$'
args:
- -c
- |
for f in "$@"; do
if [[ -f "$f" ]]; then
if ! grep -q "^name:" "$f" || ! grep -q "^description:" "$f"; then
echo "ERROR: $f is missing required frontmatter fields (name: and description:)"
exit 1
fi
fi
done