]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add check-include-guards.py to pre-commit
authorTom Tromey <tromey@adacore.com>
Wed, 17 Apr 2024 20:51:13 +0000 (14:51 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 18 Dec 2024 17:00:44 +0000 (10:00 -0700)
This changes pre-commit to run check-include-guards.py.

Reviewed-By: Tom de Vries <tdevries@suse.de>
.pre-commit-config.yaml

index 070631c0f16810606e63dc499ed08f2ad5d7d205..ea8847ef795874d5bbfa123fcf4172a4901ec51a 100644 (file)
@@ -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/.*'