mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-24 02:09:03 +03:00
Register check_commit_msg.sh as a commit-msg stage hook in the pre-commit configuration so developers get immediate feedback on commit message format during `git commit`. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
52 lines
1.6 KiB
YAML
52 lines
1.6 KiB
YAML
exclude: ^tests/ref/
|
|
|
|
# This repository keeps its pre-commit config in this nondefault path.
|
|
# Install hooks from here with:
|
|
# pre-commit install -c .forgejo/pre-commit/config.yaml
|
|
# The command above installs both the pre-commit and commit-msg hooks because
|
|
# default_install_hook_types includes them below.
|
|
default_install_hook_types:
|
|
- pre-commit
|
|
- commit-msg
|
|
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v5.0.0
|
|
hooks:
|
|
- id: check-case-conflict
|
|
- id: check-executables-have-shebangs
|
|
- id: check-illegal-windows-names
|
|
- id: check-shebang-scripts-are-executable
|
|
- id: check-yaml
|
|
- id: end-of-file-fixer
|
|
- id: file-contents-sorter
|
|
files:
|
|
.forgejo/pre-commit/ignored-words.txt
|
|
args:
|
|
- --ignore-case
|
|
- id: fix-byte-order-marker
|
|
- id: mixed-line-ending
|
|
- id: trailing-whitespace
|
|
- repo: local
|
|
hooks:
|
|
- id: check-commit-message
|
|
name: validate commit message format
|
|
language: script
|
|
entry: ./tools/check_commit_msg.sh
|
|
stages: [commit-msg]
|
|
always_run: true
|
|
- id: arm-asm-indent
|
|
name: fix arm/aarch64 assembly indentation
|
|
files: ^.*/(arm|aarch64)/.*\.S$
|
|
language: script
|
|
entry: ./tools/check_arm_indent.sh --apply
|
|
pass_filenames: false
|
|
- repo: https://github.com/codespell-project/codespell
|
|
rev: v2.4.1
|
|
hooks:
|
|
- id: codespell
|
|
args:
|
|
- --ignore-words=.forgejo/pre-commit/ignored-words.txt
|
|
- --ignore-multiline-regex=codespell:off.*?(codespell:on|\Z)
|
|
exclude: ^tools/(patcheck|clean-diff)|tests/checkasm/ext/.*$
|