aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-04-17 14:51:13 -0600
committerTom Tromey <tromey@adacore.com>2024-12-18 10:00:44 -0700
commit2285542e3c6cb4f7da0da87fb813467122be5e22 (patch)
tree7eb617f925cf421ae8a91a6cb846fecc256598e0
parentcc7096403214782a59b6c8243cd7570b015e0075 (diff)
downloadbinutils-2285542e3c6cb4f7da0da87fb813467122be5e22.zip
binutils-2285542e3c6cb4f7da0da87fb813467122be5e22.tar.gz
binutils-2285542e3c6cb4f7da0da87fb813467122be5e22.tar.bz2
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>
-rw-r--r--.pre-commit-config.yaml9
1 files changed, 9 insertions, 0 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 070631c..ea8847e 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/.*'