[PATCH 3/4] Add check-include-guards.py to pre-commit
Simon Marchi
simark@simark.ca
Thu Apr 18 15:33:01 GMT 2024
On 2024-04-17 18:05, Tom Tromey wrote:
> This changes pre-commit to run check-include-guards.py.
> ---
> .pre-commit-config.yaml | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
> index 8721dac678b..b3dcf6482cf 100644
> --- a/.pre-commit-config.yaml
> +++ b/.pre-commit-config.yaml
> @@ -22,3 +22,10 @@ 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
> + files: '^(gdb(support|server)?)/[^/]*(/[^/]*)?\.h$'
The regex is a bit hard to read... can you add a comment to indicate
what this indends to match? I think this does not match header files
under gdb/testsuite (because they are deeper than what the regex would
match)?
Simon
More information about the Gdb-patches
mailing list