From 2285542e3c6cb4f7da0da87fb813467122be5e22 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 17 Apr 2024 14:51:13 -0600 Subject: [PATCH] Add check-include-guards.py to pre-commit This changes pre-commit to run check-include-guards.py. Reviewed-By: Tom de Vries --- .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/.*'