pre-commit-crocodile¶
Git hooks intended for developers using pre-commit and commitizen.
Table of contents
Using pre-commit-crocodile hooks¶
Sources / .pre-commit-config.yaml
# pre-commit configurations
default_install_hook_types:
- prepare-commit-msg
- pre-commit
- pre-push
default_stages:
- prepare-commit-msg
- pre-commit
- pre-push
minimum_pre_commit_version: 3.8.0
# pre-commit repositories
repos:
# Repository: pre-commit-crocodile
- repo: https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile
rev: X.Y.Z # Adapt to latest release tag
hooks:
- id: ...
prepare-commit-message
¶
Automatically prepare the commit message based on changed sources before manual edition :
-
-
Launched automatically by Git upon
prepare-commit-msg
stage usingpre-commit
- Parse
Changes to be committed:
to automatically prepare atype(scope): ...
title - Commit messages implementation derived from Conventional Commits specifications
- Automatically detect and prepare templates like
ci(gitlab-ci):
,docs(readme):
,build(makefile):
ordocs(changelog):
- Automatically evaluate sources specific scopes, for example files or folders under
src/
, or recipe folders in Yoctorecipes-.../
sources - Message body is automatically inserted to help developers document their commits or link to a related issue
- Commits with sign-off messages automatically receive a
---
separator for readability on GitLab
check-yaml-ruamel-pure
¶
Check YAML files using ruamel.yaml pure Python implementation :
-
-
Specifically created to use the pure Python implementation of
ruamel.yaml
- Recommended here by the maintainer (Anthon van der Neut)
- Use this hook if
check-yaml
raises these parsing failures : - Drop-in alternative to the
check-yaml
original hook's--unsafe
mode