Files
FFmpeg/tools
Jun Zhao 4394a36c6b tools/check_commit_msg: add commit message validation script
Add a shell script that validates commit messages against FFmpeg
conventions.  Based on the lint_commit_msg.py checker from mpv
(Kacper Michajłow, Timo Rothenpieler).

Supports three entry points: stdin (for CI pipelines), file
argument (for pre-commit commit-msg hook), and revision range
(for manual batch checking).

Checks enforced (errors block):
  - Subject matches "component[/module]: description" pattern
  - No conventional-commits style (feat:/fix:/chore:/refactor:)
  - Blank line between subject and body
  - No duplicate Signed-off-by from same person
  - No multiple subject-like lines in body (squash-mess detection)

Checks that only warn:
  - Subject line > 120 characters
  - Trailing whitespace on subject line
  - Subject should not end with a period
  - Prefix should not contain file extension (.c, .h, etc.)

Merge, Revert and Reapply subjects are exempted from format checks.

Usage:
  echo "avcodec/vvc: fix pred" | sh tools/check_commit_msg.sh
  sh tools/check_commit_msg.sh .git/COMMIT_EDITMSG
  sh tools/check_commit_msg.sh HEAD~5..HEAD

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2026-06-18 10:35:27 +00:00
..
2025-02-25 02:03:58 +01:00
2025-04-22 20:45:57 +02:00
2022-02-24 12:56:49 +01:00
2025-08-03 13:48:47 +02:00
2021-07-22 14:47:57 +02:00
2025-05-07 15:35:47 +02:00
2025-04-22 20:45:57 +02:00
2024-08-08 15:26:52 +02:00
2025-04-22 20:45:57 +02:00
2026-05-15 20:35:56 -03:00
2025-08-03 13:48:47 +02:00