From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iz4pJQL7ymgtNAgAWB0awg (envelope-from ) for ; Wed, 17 Sep 2025 14:16:34 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=aD1xApgd; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=CJ6LR5gG; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=DdrWH8uk; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Yq+V0UuZ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 87DFD1E04C; Wed, 17 Sep 2025 14:16:34 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 453261E04C for ; Wed, 17 Sep 2025 14:16:33 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C54C13858C62 for ; Wed, 17 Sep 2025 18:16:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C54C13858C62 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=aD1xApgd; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=CJ6LR5gG; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=DdrWH8uk; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Yq+V0UuZ Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id 411003858D29 for ; Wed, 17 Sep 2025 18:15:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 411003858D29 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 411003858D29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1758132958; cv=none; b=hyQvSOzSQy2Yxo+S0viQmudxbhx5iacpAz3yBZDLFLLtRL4441UxMGHeRBpUjEFD2VrvYHqJ8yOfNxjxiuFOpZ4hA21rfsi3aibEjGfbfZKqSnSepKdCSbAodtjJ+BBNFm+DpWk5cnpcZYvUXAm/+y/Uo9Dr7hqnugj8shBPzcc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1758132958; c=relaxed/simple; bh=i6kgotlqYui2RpyNTIFPU887LbkNl1T43sfew9dh1+s=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=rTUjVYkjeXOMWxWym00CiFIOKFNrWaa8QZY3xql4jafV/kFoIu4BBkhAQYfeG5oKV6PITcn02aH0S1KShKSPXK3ru17/wU5rXaJ6zHr4wui+qHWc5FdUEhjGDcRog1D+PfChgIsfpq7+WizAiXaSsPu5L87pIIBtu2pbH9Jua0o= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 411003858D29 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E66B75C0C7; Wed, 17 Sep 2025 18:15:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1758132957; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G9xbWs4JmQ2073IUwZaxeA46GfSE1UJEb8aTYJS+4NM=; b=aD1xApgdJPTAq3F+QS1gYVpLssoFFISOSC3IKeHsPwRY26zauwCrQb9IgE2zv9AOwJeYuP E0Ytr6znwXXTgfH6xM4frwghknAnX/I1kK+fK70uVtuj5KpsA02Xnw10JA5gxGi4yKKPzp jtc4AC9lOXDERb0Y3iLG4BGec04QoTQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1758132957; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G9xbWs4JmQ2073IUwZaxeA46GfSE1UJEb8aTYJS+4NM=; b=CJ6LR5gGh1h3DLvl12FoE++3r8ZldRFajw0KNJuQ5JSPt1pdZxjZgvh/Shqw3D5YM2ZrSz OhOoz4r9N40Yo5DQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=DdrWH8uk; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=Yq+V0UuZ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1758132956; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G9xbWs4JmQ2073IUwZaxeA46GfSE1UJEb8aTYJS+4NM=; b=DdrWH8ukhoKoXRHcZ6fi6xgzVIbo2R2aOJWiHbEnNbkJy8Z8o/cPfysJauC7YsLU2LERyu 4AtzHlEr6RWLDAk9wvcvzpYUx8fvKxLAIElOQw8CqxHLh+KwcVkU9PZrXnnngBWVhgsXtD Aa170/jBiM04S4KZ7tf3NJnSNk9tFgU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1758132956; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G9xbWs4JmQ2073IUwZaxeA46GfSE1UJEb8aTYJS+4NM=; b=Yq+V0UuZb6V6oxi7X9MOF5gPb8R9I2QV5F1lb0SRmACkvYNz4DI92ff9JZvLYU4wAiAQTp utB3LtSA8rnSJYBQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id CD425137C3; Wed, 17 Sep 2025 18:15:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id K/zYMNz6ymj2UAAAD6G6ig (envelope-from ); Wed, 17 Sep 2025 18:15:56 +0000 Message-ID: <5251058c-de2a-450a-bbbf-e420ae941047@suse.de> Date: Wed, 17 Sep 2025 20:15:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [pre-commit] Add tclint hook To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20250915084105.23171-1-tdevries@suse.de> <87frcljdax.fsf@tromey.com> Content-Language: en-US From: Tom de Vries In-Reply-To: <87frcljdax.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: E66B75C0C7 X-Rspamd-Action: no action X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,suse.de:email]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:106:10:150:64:167:received,2a07:de40:b281:104:10:150:64:97:from]; DKIM_TRACE(0.00)[suse.de:+] X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 9/17/25 17:42, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> Add a pre-commit hook that enables tclint [1] (a Tcl linter) for the gdb > Tom> testsuite. > > Tom> The pre-commit hook doesn't reference the official url, because that one > Tom> doesn't have pre-commit support yet [2]. > > My first reaction was to say we should wait but after reflecting a bit, > I think it's probably better to just go ahead and then switch when > tclint upstream catches up. > > Tom> Also add a tclint configuration file gdb/testsuite/tclint.toml. > > How about using pyproject.toml so we can have (nearly) all this kind of > config in one spot? Hi Tom, thanks for the review, and for supporting the idea. I've just tried transferring settings to gdb/pyproject.toml (see patch below), but that didn't work. The docs say it's supposed to work though, so some debugging is needed. Thanks, - Tom diff --git a/gdb/pyproject.toml b/gdb/pyproject.toml index 4469f1cd61d..d271939df5c 100644 --- a/gdb/pyproject.toml +++ b/gdb/pyproject.toml @@ -3,3 +3,57 @@ include = "\\.py(\\.in)?$" [tool.pyright] typeCheckingMode = "strict" + +[tool.tclint] +exclude = [ +"gdb/testsuite/boards", +"gdb/testsuite/config", +"gdb/testsuite/lib", +"gdb/testsuite/gdb.ada", +"gdb/testsuite/gdb.arch", +"gdb/testsuite/gdb.asm", +"gdb/testsuite/gdb.base", +"gdb/testsuite/gdb.btrace", +"gdb/testsuite/gdb.compile", +"gdb/testsuite/gdb.cp", +"gdb/testsuite/gdb.ctf", +"gdb/testsuite/gdb.dap", +"gdb/testsuite/gdb.debuginfod", +"gdb/testsuite/gdb.disasm", +"gdb/testsuite/gdb.dlang", +"gdb/testsuite/gdb.dwarf2", +"gdb/testsuite/gdb.fortran", +"gdb/testsuite/gdb.gdb", +"gdb/testsuite/gdb.go", +"gdb/testsuite/gdb.guile", +"gdb/testsuite/gdb.linespec", +"gdb/testsuite/gdb.mi", +"gdb/testsuite/gdb.multi", +"gdb/testsuite/gdb.opencl", +"gdb/testsuite/gdb.perf", +"gdb/testsuite/gdb.python", +"gdb/testsuite/gdb.reverse", +"gdb/testsuite/gdb.rocm", +"gdb/testsuite/gdb.server", +"gdb/testsuite/gdb.stabs", +"gdb/testsuite/gdb.threads", +"gdb/testsuite/gdb.trace", +] +# A maximum line length of 80 is current policy, but hasn't been too strictly +# enforced. It's the most frequent and least harmful violation. +# Ignore this for now. +ignore = ["line-length"] +extensions = ["exp", "tcl"] + +[tool.tclint.style] +# Used by tclfmt. Doesn't support mixed TAB and spaces style we use. See +# this tclint issue ( https://github.com/nmoroze/tclint/issues/109 ). +indent = 4 +# Used by both tclint and tclfmt. Current policy is 80. +line-length = 80 +# Used by tclfmt. +max-blank-lines = 1 +# Used by tclfmt. False conflicts with emacs tcl mode. +indent-namespace-eval = true +# Used by tclfmt. +spaces-in-braces = false