[Scummvm-git-logs] scummvm master -> 5aaf476b739e4787d7efe0453e3ced24eae6e2e5
sev-
noreply at scummvm.org
Sat Nov 29 09:01:40 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
5aaf476b73 JANITORIAL: add pre-commit yaml with clang-tidy
Commit: 5aaf476b739e4787d7efe0453e3ced24eae6e2e5
https://github.com/scummvm/scummvm/commit/5aaf476b739e4787d7efe0453e3ced24eae6e2e5
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2025-11-29T10:01:37+01:00
Commit Message:
JANITORIAL: add pre-commit yaml with clang-tidy
You can opt-in by install pre-commit, `pip install --upgrade pre-commit`,
then run `pre-commit install` in scummvm directory.
Changed paths:
A .pre-commit-config.yaml
A devtools/check-commit-msg.py
.clang-format
diff --git a/.clang-format b/.clang-format
index 4eba7ce6dda..6d22ffc63a5 100644
--- a/.clang-format
+++ b/.clang-format
@@ -19,5 +19,5 @@
SpacesInAngles: false,
SpacesInParentheses: false,
SpacesInSquareBrackets: false,
- Standard: c++03,
+ Standard: c++11,
}
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 00000000000..f54bb88c56b
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,18 @@
+repos:
+- repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v6.0.0
+ hooks:
+ - id: check-yaml
+ - id: end-of-file-fixer
+ - id: trailing-whitespace
+- repo: https://github.com/pre-commit/mirrors-clang-format
+ rev: v21.1.2
+ hooks:
+ - id: clang-format
+- repo: local
+ hooks:
+ - id: check-commit-msg
+ name: check-commit-msg
+ language: python
+ entry: devtools/check-commit-msg.py
+ stages: [ commit-msg ]
diff --git a/devtools/check-commit-msg.py b/devtools/check-commit-msg.py
new file mode 100755
index 00000000000..ada3008e3b4
--- /dev/null
+++ b/devtools/check-commit-msg.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+
+import sys
+import os
+import re
+from argparse import ArgumentParser
+
+parser = ArgumentParser(description="SCUMMVM check commit message hook")
+parser.add_argument("message")
+args = parser.parse_args()
+
+with open(args.message, "rt") as f:
+ text = f.read()
+
+MESSAGE_FORMAT = re.compile(r"[A-Z_]+:")
+
+if MESSAGE_FORMAT.match(text):
+ sys.exit(0)
+
+print("Please start your commit message with subsystem or engine name written in CAPS", file=sys.stderr)
+print("See https://wiki.scummvm.org/index.php/Commit_Guidelines", file=sys.stderr)
+print("Your original message follows:\n\n", text)
+sys.exit(1)
More information about the Scummvm-git-logs
mailing list