From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id BA93F3858424; Fri, 29 Jul 2022 09:29:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BA93F3858424 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.93,201,1654588800"; d="scan'208";a="80370079" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 29 Jul 2022 01:29:35 -0800 IronPort-SDR: xeALo/sXasZh9IzfbXrI+H0AK/50BIr/xxhwZ1MkYUy5yyF3Z29/0rsuv3sNUdvpSsyOS6XsWu vlMhPGz5n6xdJXK0ZwIJWLyyyaievU6cXfoAhxEvJkQNdP05ipYxCimozpxsx7GK9Ly2HqglhN zr1/Ugyt/2ZFyiBzwVPmb8PWkyK+ZyKMxCcNrgcEv/xvrGcQ09WOVZmT5Mw8XUuGVXeNft+2YW 5IXb5H3exyYcCXv9TDvPo1uWedZFq0km1Q5HB9T1rZy0rOHDYhCPDoicarDhJBJ0lNw0BDAn0B Imw= From: Thomas Schwinge To: Marc Poulhies CC: , Alexander Monakov , Iannetta Paul , David Malcolm , Subject: Re: Setting up editors for the GNU/GCC coding style? In-Reply-To: <8735ekmkty.fsf@adacore.com> References: <8735ekmkty.fsf@adacore.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Fri, 29 Jul 2022 11:29:03 +0200 Message-ID: <874jz09sio.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-rust@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: gcc-rust mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2022 09:29:39 -0000 Hi! On 2022-07-29T09:36:41+0200, Marc Poulhies via Gcc wrote: > Iannetta Paul writes: >> About configuring recent editors to follow the GNU coding style, I don't= really >> know but it should always be possible to register a hook that will run `= indent` >> when the file is saved. > > There is a clang-format config file in contrib that one can symlink in > the root dir as .clang-format. I hope/guess tools like CLion can pick it > and use it? At least this can be used to indent using clang-format tools > and derivatives (like git-clang-format). In the GCC Rust project, we are > using it (but judging by Jakub's last review for Philip's patch, the > config is maybe not exhaustive, or our setup is not correct). Simple answer there: these files are in 'gcc/config/' etc., but 'clang-format' is restricted to 'gcc/rust/' only (both in '.github/workflows/clang-format.yml' and 'CONTRIBUTING.md': "Running `clang-format` locally"). Unless everyone uses it, using 'clang-format' everywhere is too noisy; it has a very strict (in my opinion: restrictive) understanding of "proper" format. ;-) Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955