From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id BAnnIprglWoHdhgAWB0awg (envelope-from ) for ; Mon, 31 Aug 2026 16:14:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1788207258; bh=IwlQeUweu6kVdworjUZbRsUrDAVa/OpWl3TN3yMLZ+w=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sRvF6GCsGEK5wABgMvAC8kUf9IES8/ecq2enzl1JlrSbqlVs+/plTdnSH8yfIFIPN ++oxi0lErslqrVCL/4iAC10iJua6uPqA0vhIPIJrYAqTpcPDQktLoPeUDbEBX01XtT ch24mtRhAU/G/8lrGQ8jwT2C8RFpTB1LhKlCEvm8= Received: by simark.ca (Postfix, from userid 112) id 613AC1E166; Mon, 31 Aug 2026 16:14:18 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) 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=ham autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=cTQuv+4B; dkim-atps=neutral Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (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 CBF371E033 for ; Mon, 31 Aug 2026 16:14:16 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3A81D4BA799B for ; Mon, 31 Aug 2026 20:14:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A81D4BA799B Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=cTQuv+4B Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 833EE4BA798C for ; Mon, 31 Aug 2026 20:13:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 833EE4BA798C 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 833EE4BA798C Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788207232; cv=none; b=q9AKTktbheiaVSoni93oBj5etDmHOaZe3RBdp6zli29/SM7ShEengiGEmjMYCtADy9sp5hSR8DknsJeSAgVShntMlFjB8GiDiSBeKcUgaUq3fvMG0AaihtEnjcL8XG+tJep9zGXm69zPZKqrhS0NjU696CxgF4wOJHf+Bf7iXUU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788207232; c=relaxed/simple; bh=IwlQeUweu6kVdworjUZbRsUrDAVa/OpWl3TN3yMLZ+w=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=MG3T3L7YHCMM0RURxKKx6iLZrKBJD23xXUhkPh/5tb4wPara4FOaxDe8txwmyDETZpDCOcxoPSWoKs+SUgL5svDWdCbZ5hy/HGiI5IwDYUxJC0iobrJqbWMBN/RN/cBJhIVtZHfNSQ08NBC10fqELibC+BblyTrweBsN11b5x8g= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=cTQuv+4B DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 833EE4BA798C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1788207231; bh=IwlQeUweu6kVdworjUZbRsUrDAVa/OpWl3TN3yMLZ+w=; h=Date:Subject:To:References:From:In-Reply-To:From; b=cTQuv+4BpjXd4QySVL30N8T/3+RFf6EW+2iOYClt8SUOgDA/Yrfad7fgOPzQEyaTd GpIZC3VhFwSWAo8R0uUN9TSlPfsrDBvnuUtQ+INDfymk6x6bldq47fYdTXjt0sKN81 RAdgapbIDNakcqGHtQdkO251xyApsb37v13eJyNw= Received: by simark.ca (Postfix) id 2FBFD1E033; Mon, 31 Aug 2026 16:13:50 -0400 (EDT) Message-ID: <8ff5061d-082c-4a00-90e4-31857e655027@simark.ca> Date: Mon, 31 Aug 2026 16:13:49 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/3] [gdb] Use shfmt on regformats/regdat.sh To: Tom de Vries , gdb-patches@sourceware.org References: <20260830195315.1497894-1-tdevries@suse.de> <20260830195315.1497894-3-tdevries@suse.de> Content-Language: fr From: Simon Marchi In-Reply-To: <20260830195315.1497894-3-tdevries@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 8/30/26 3:53 PM, Tom de Vries wrote: > Run shfmt [1] on gdb/regformats/regdat.sh: > ... > $ shfmt \ > --language-dialect=posix \ > --indent=4 \ > --func-next-line \ > --space-redirects \ > --write \ > gdb/regformats/regdat.sh It would be nice to have a script to easily do this on all our shell scripts, which we could also run in the CI (like we run black to verify the Python code formatting). > ... > followed by emacs whitespace-cleanup (because shfmt doesn't know about mixed > tab/spaces indentation). I guess said script would need to do this too (I wonder if it can be done with sed, replacing leading groups of 8 spaces with a tab). > Normalizes things like: > ... > if true > then > ... > to: > ... > if true; then > ... > as suggested by Simon [2]. > > Also: > - makes sure statements are on their own line > - removes double empty line > - minor whitespace changes: > - do_read () -> do_read() > - cat < cat << EOF > > [1] https://github.com/mvdan/sh > [2] https://sourceware.org/pipermail/gdb-patches/2026-August/229818.html All the changes in the diff LGTM. Approved-By: Simon Marchi Simon