From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 7E2B73858D33 for ; Thu, 18 Apr 2024 15:33:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7E2B73858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7E2B73858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713454384; cv=none; b=NJs7WyEmZuu8+FpfNCguh0+C3W5D/2Ber20LcsMpjoEIQH4tiJqNIMJzQyjDzTgxSkoQPPPbyK40ED+ZBiB/UVl3crdw9RVG0Iyl4o864QJy7QLH+SSowKffovg71IdyANE/auMM/sGamIxXgIRVskFcviHNki35w9aIC2HK4xM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713454384; c=relaxed/simple; bh=qiKMI3xY8tQrufse3Uw0cdkXuFA0/yWzt4NreyW75CU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=LbruKhMNpFSbR3Epf8KFhtZkiLl2nM2GTdFWd0XGHd1mFMKdF90IsxVE4KpfCfk2fnF8JnvXxdQ/ghZ8oRjKRZtmRrnN6dtPYRqDwomPZ9/f7+59CPZ+F1PCYvf/FKy7Xda+M5shOF9QGfLutBKEo2Z5FNAfOqltt7M9S7OQIn0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1713454382; bh=qiKMI3xY8tQrufse3Uw0cdkXuFA0/yWzt4NreyW75CU=; h=Date:Subject:To:References:From:In-Reply-To:From; b=HkcSdQMh9eSY6N0xYTlqqaQAeUXmIJg3DwffAMB/C0ZhohwVVn4vzI3/EHYcIS1E6 hj/+6kPiYOD5JQAsBfDaKWQiGvHQlZ0xpC0YCPYDkTcl6lPLU9BJf/b9CcT5DmKAzc /iW3+rSfdafQJmwQHWArLCwUWnadNY544LtEEUu0= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id CE9F11E092; Thu, 18 Apr 2024 11:33:01 -0400 (EDT) Message-ID: <7c984d39-27a2-4d6e-aea7-08ffc2417cdb@simark.ca> Date: Thu, 18 Apr 2024 11:33:01 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/4] Add check-include-guards.py to pre-commit To: Tom Tromey , gdb-patches@sourceware.org References: <20240417-header-check-v1-0-a60f610f5bcc@adacore.com> <20240417-header-check-v1-3-a60f610f5bcc@adacore.com> Content-Language: en-US From: Simon Marchi In-Reply-To: <20240417-header-check-v1-3-a60f610f5bcc@adacore.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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