From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 1C6DD7803E3 for ; Mon, 25 Sep 2023 15:39:45 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=4CLsey9dQJUYLTh4l7VFE7qpUAfVM8SFZFvXBsH9iw4=; c=relaxed/simple; d=groups.io; h=From:MIME-version:Subject:Date:References:To:In-reply-to:Message-id:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-type:Content-transfer-encoding; s=20140610; t=1695656384; v=1; b=WAif7If0Z9hbE7V5xfs60W3n4R6Ktswxp7gmxsVHykXLVdVHR2RP7iMenDgh7O9o3Yx/XOcJ d6bIEh53OxiVcjr1WsEIWWlckjM2PGGDCbOuZO2P7ugdWx+NhUA8GF6194sRzBsU98uVrJM9acn mCU4azIRJMP6+ARo8ed24LHs= X-Received: by 127.0.0.2 with SMTP id z2y6YY7687511xgxYkdgCAK6; Mon, 25 Sep 2023 08:39:44 -0700 X-Received: from ma-mailsvcp-mx-lapp03.apple.com (ma-mailsvcp-mx-lapp03.apple.com [17.32.222.24]) by mx.groups.io with SMTP id smtpd.web10.64128.1695656384102456272 for ; Mon, 25 Sep 2023 08:39:44 -0700 X-Received: from rn-mailsvcp-mta-lapp04.rno.apple.com (rn-mailsvcp-mta-lapp04.rno.apple.com [10.225.203.152]) by ma-mailsvcp-mx-lapp03.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) with ESMTPS id <0S1J010N4STZ9U00@ma-mailsvcp-mx-lapp03.apple.com> for devel@edk2.groups.io; Mon, 25 Sep 2023 08:39:43 -0700 (PDT) X-Proofpoint-GUID: 5UxV71xwPdnM59yIQPE5_24F-wr-SJwO X-Proofpoint-ORIG-GUID: 5UxV71xwPdnM59yIQPE5_24F-wr-SJwO X-Received: from rn-mailsvcp-mmp-lapp02.rno.apple.com (rn-mailsvcp-mmp-lapp02.rno.apple.com [17.179.253.15]) by rn-mailsvcp-mta-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) with ESMTPS id <0S1J00UL6SU44CH0@rn-mailsvcp-mta-lapp04.rno.apple.com>; Mon, 25 Sep 2023 08:39:40 -0700 (PDT) X-Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp02.rno.apple.com by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) id <0S1J00S00STR1A00@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Mon, 25 Sep 2023 08:39:40 -0700 (PDT) X-Va-A: X-Va-T-CD: 0fc4ca8cc3f20265c7d442bbbc719557 X-Va-E-CD: b97c220703b7bed03584e37c55b62cd2 X-Va-R-CD: bcc793a4ec4bf1d0c349b5f302d98e4e X-Va-ID: a306b669-a2e2-4306-871a-54b9618f220d X-Va-CD: 0 X-V-A: X-V-T-CD: 0fc4ca8cc3f20265c7d442bbbc719557 X-V-E-CD: b97c220703b7bed03584e37c55b62cd2 X-V-R-CD: bcc793a4ec4bf1d0c349b5f302d98e4e X-V-ID: 30850249-fd25-44af-b092-7d3fc74ab0aa X-V-CD: 0 X-Received: from smtpclient.apple (unknown [17.11.103.39]) by rn-mailsvcp-mmp-lapp02.rno.apple.com (Oracle Communications Messaging Server 8.1.0.23.20230328 64bit (built Mar 28 2023)) with ESMTPSA id <0S1J002DNSU2S500@rn-mailsvcp-mmp-lapp02.rno.apple.com>; Mon, 25 Sep 2023 08:39:40 -0700 (PDT) From: "Andrew Fish via groups.io" MIME-version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: [edk2-devel] Maybe it is time to update code style? Date: Mon, 25 Sep 2023 08:39:25 -0700 References: To: devel@edk2.groups.io, marcin.juszkiewicz@linaro.org In-reply-to: Message-id: Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,afish@apple.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: rK3JVa2qEHca8tz3Li8i8esix7686176AA= Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=WAif7If0; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io It took me 2-3 weeks to flip my brain over to the 2 space indent. It was no= t so bad when I was just working on EFI stuff but if switch around between = projects my editor having the wrong settings gets a lit old sometimes.=20 The history of this was some of the old Intel legacy BIOS devs really pushe= d for the 2 spaces vs. 4 spaces so we let them have a win in the requiremen= ts. Turns out they have an old dot matrix printer with that old computer pa= per that had alternating colors on every line to make it easier to read the= code. They pushed for 2 spaces so less code would line wrap on their team = printer=E2=80=A6.. Thanks, Andrew Fish > On Sep 25, 2023, at 2:03 AM, Marcin Juszkiewicz wrote: >=20 > I feel sick each time I have to edit EDK2 code. >=20 > All those INF, DEC, DSC, FDF, XYZ files are something I do not even try > to understand, just got minimal knowledge what goes where by asking Leif > (thanks a lot!) and observing build error messages. >=20 > I got used to UINTN and other weird variable types. No idea where from > they came from (MS Windows?) >=20 >=20 > But what sucks more is those 2 spaces used for indenting code. Took me > a while to reming myself when I used such. It was in 90s, when I was > Amiga programmer and all I had was 720x480px screen. >=20 > Last time I looked at calendar it was 2023 year. Maybe it is time to move > to 4 spaces? >=20 > And can someone take a look at config of code obfuscator used for linting= ? > It spits out amount of information showing that noone looked at updating = it > to current version: >=20 > $ uncrustify -c ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg S= ilicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c > Option: at ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:48= : Expected unsigned number , for 'mod_full_brace_if_chain'; got 'false' > ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:79: unknown option = 'indent_func_call_edk2_style' > Option: at ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:212= : Expected number , for 'indent_bool_paren'; got 'true' > Option: at ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:224= : Expected number , for 'indent_comma_paren'; got 'true' > ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:241: option 'indent= _sing_line_comments' is deprecated; did you want to use 'indent_single_line= _comments_before' instead? > ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:270: unknown option= 'align_edk2_style' > ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:426: option 'nl_fun= c_var_def_blk' is deprecated; it has been replaced by 'nl_var_def_blk_end_f= unc_top'. > You can also use 'nl_var_def_blk_end' for additional functionality > ../edk2/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg:447: option 'pp_spa= ce' is deprecated; it has been replaced by 'pp_space_after'. > Output suffix: .uncrustify > do_source_file(1524): Parsing: Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpi= Dxe/SbsaQemuAcpiDxe.c as language C >=20 > $ uncrustify --version > Uncrustify_d-0.76.0_f >=20 >=20 > And yet it is a tool which contributors like me are supposed to use befor= e > sending any change upstream. >=20 >=20 >=20 >=20 >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109046): https://edk2.groups.io/g/devel/message/109046 Mute This Topic: https://groups.io/mt/101570674/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-