From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id xFSiODyvimc/pRIAWB0awg (envelope-from ) for ; Fri, 17 Jan 2025 14:27:56 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=EYL3hMYb; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D75841E100; Fri, 17 Jan 2025 14:27:56 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.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 autolearn=unavailable autolearn_force=no version=4.0.0 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 375E11E05C for ; Fri, 17 Jan 2025 14:27:56 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CC6D5383F861 for ; Fri, 17 Jan 2025 19:27:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC6D5383F861 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1737142075; bh=+s++uiZ5FngcoxqSan0jTW9QwhtodWigc8VIqr71/z4=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=EYL3hMYbZLPLWVH5fBEaT4eglo8tYEed7c18St7qjjYfXgcVOYpQ0QJ0eXtjcrFjJ KohhUDwvhQALulL24UzLx+PY7tgOY87C93XnbqZ58auZAtS3hmx12+SimNkAhQgxvx P4MJMAFdNZyLQ+5j/DSpY04tOSN2pqUiHb69lTds= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id B376E383F851 for ; Fri, 17 Jan 2025 19:27:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B376E383F851 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B376E383F851 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1737142031; cv=none; b=Q0UU65DD+gsmFTK080Uzc7OsKBYFeeM7i4K5vYdUmNhewqDmIGjaGiJLXZx4Lr8uyDiM2AFqCgzs1SsdXxkQD7xVFBZT4Vj2JdqQpMpoKWXNcQrK7uDcSKPCOsdeQBeyYe+AzaV/Yr9BuEJL/BEeJzH6qn61Pw8j13sjumxuMV0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1737142031; c=relaxed/simple; bh=/Tl77QM1sK/d7ADGAk+dTp3ZCb6KjsuwoNK1LbL6khA=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:To:From; b=DKkZFwYJOQWVXJm71m+lK6l1gpo/srmUkeL+dodX4moa/aJakNRm7ZpVJRrs0euCTFjboivehAIqgq3axLX5ysZcszZ+Nr+IXc6z196HpRFSRkQt0KdLZv6mHO6SVwSITTFGMWqIWs635Ar5UwSekgvDUFPT9dpX5K2vD8RdT6I= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B376E383F851 Received: by simark.ca (Postfix, from userid 112) id 693291E105; Fri, 17 Jan 2025 14:27:11 -0500 (EST) Received: from [192.168.126.187] (unknown [204.48.78.22]) (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 9B5BE1E05C; Fri, 17 Jan 2025 14:27:10 -0500 (EST) Message-ID: <7d27ffa1-c16c-4f02-836e-e1f7fc659dfd@simark.ca> Date: Fri, 17 Jan 2025 14:27:09 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: automated coding style tool To: Phi , gdb@sourceware.org References: <74c8b867-f5bb-48f7-9849-11d06e63a3d7@arm.com> <87tta2r5z2.fsf@redhat.com> <87tta1qq1i.fsf@tromey.com> <2985f4ae-33c0-4e02-8982-fa132f4d3741@simark.ca> <87msftuhd3.fsf@tromey.com> <877c6to8um.fsf@redhat.com> Content-Language: fr In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb Reply-To: Simon Marchi Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" On 1/17/25 12:36 PM, Phi via Gdb wrote: > > > On 17/01/2025 16:55, Simon Marchi via Gdb wrote: > >> >> Of course, like Joel said, ill-formatted code will certainly get >> committed at some point, but the nightly job will tell us. It's a quick > > Just curious about this interesting thread. I'd like to understand the ill-formatted concept while using a code formatter. I was wondering a !ill-formatted, i.e a well-formatted should always produce a no diff output on its input, I mean > > $ format-tool foo.c > > must produce foo.c with no diff's I once had a situation where clang-format would ping pong between two formattings for a given line of code when running multiple times on the same file. This was an unfortunate bug, but easily circumvented by adding a /* clang-format off */ annotation. Given the amount of code that this tool has formatted without any problem for me, I can forgive this one bug :). > a hook of some kind can be implemented may be at commit or push time (or git-send-mail) saying the format-tool must be run first and QA re-run. We were discussing the merits of using a tool to format the code if there is not pre-push check, if the responsibility to run the tool solely falls on each contributor doing it on their side. Some ill-formatted code will get pushed at some point. My point is that it's not the end of the world, and it's still better than using no tool at all. But of course, something that blocks the push if ill-formatted code is present is even better. Simon