From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 3/4] Add check-include-guards.py to pre-commit
Date: Thu, 18 Apr 2024 11:33:01 -0400 [thread overview]
Message-ID: <7c984d39-27a2-4d6e-aea7-08ffc2417cdb@simark.ca> (raw)
In-Reply-To: <20240417-header-check-v1-3-a60f610f5bcc@adacore.com>
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
next prev parent reply other threads:[~2024-04-18 15:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 22:05 [PATCH 0/4] Add include guard checker and reformatter Tom Tromey
2024-04-17 22:05 ` [PATCH 1/4] Fix some minor header file irregularities Tom Tromey
2024-04-17 22:05 ` [PATCH 2/4] Add an include-checking script Tom Tromey
2024-04-18 12:54 ` Tom de Vries
2024-04-18 15:31 ` Tom Tromey
2024-04-18 15:29 ` Simon Marchi
2024-04-18 15:40 ` Tom Tromey
2024-04-18 15:42 ` Simon Marchi
2024-04-17 22:05 ` [PATCH 3/4] Add check-include-guards.py to pre-commit Tom Tromey
2024-04-18 15:33 ` Simon Marchi [this message]
2024-04-18 15:45 ` Tom Tromey
2024-04-17 22:05 ` [PATCH 4/4] Run check-include-guards.py Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7c984d39-27a2-4d6e-aea7-08ffc2417cdb@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=tromey@adacore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).