[binutils-gdb] Add check-include-guards.py to pre-commit
Tom Tromey
tromey@sourceware.org
Wed Dec 18 17:29:35 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2285542e3c6cb4f7da0da87fb813467122be5e22
commit 2285542e3c6cb4f7da0da87fb813467122be5e22
Author: Tom Tromey <tromey@adacore.com>
Date: Wed Apr 17 14:51:13 2024 -0600
Add check-include-guards.py to pre-commit
This changes pre-commit to run check-include-guards.py.
Reviewed-By: Tom de Vries <tdevries@suse.de>
Diff:
---
.pre-commit-config.yaml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 070631c0f16..ea8847ef795 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -59,3 +59,12 @@ repos:
- id: isort
types_or: [file]
files: 'gdb/.*\.py(\.in)?$'
+ - repo: local
+ hooks:
+ - id: check-include-guards
+ name: check-include-guards
+ language: python
+ entry: gdb/check-include-guards.py
+ # All gdb header files, but not headers in the test suite.
+ files: '^(gdb(support|server)?)/.*\.h$'
+ exclude: '.*/testsuite/.*'
More information about the Binutils-cvs
mailing list