Notes to Self

Alex Sokolsky's Notes on Computers and Programming

pre-commit Hook

References:

brew install pre-commit commitizen
pre-commit install --hook-type pre-commit --hook-type commit-msg --hook-type pre-push

Create you own version of .pre-commit-config.yaml:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v4.4.0
  hooks:
    - id: check-added-large-files
    - id: check-json
    - id: check-merge-conflict
    - id: check-yaml
    - id: end-of-file-fixer
    - id: trailing-whitespace
- repo: https://github.com/rhysd/actionlint
  rev: v1.6.25
  hooks:
    - id: actionlint-docker
- repo: https://github.com/commitizen-tools/commitizen
  rev: v3.12.0
  hooks:
    - id: commitizen
    - id: commitizen-branch
      stages: [ pre-push ]