From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web11.6676.1637803508336088853 for ; Wed, 24 Nov 2021 17:25:08 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=Qq3SQV50; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [10.0.0.19] (c-73-27-179-174.hsd1.fl.comcast.net [73.27.179.174]) by linux.microsoft.com (Postfix) with ESMTPSA id E410720D4DF8; Wed, 24 Nov 2021 17:25:06 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E410720D4DF8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1637803507; bh=Xg2gq5ObPqyhF8H81iScuafl2dHVDrCt7JnjfQ74PgE=; h=Date:Subject:From:To:Cc:Reply-To:References:In-Reply-To:From; b=Qq3SQV50DWS8gbusT22q+wdOkYusWr2EXDP1RnMEsM8nQv8aQcZ+w/301nJzx9wLH XZnBJTC4LVwnDPigMOB7TDHYM5gifFfwXJooc3niS05rqEchUw3guU4i90OkJCBWri tIKGZkMf8JGQYa826VAwWaJnEo/DzkROJtDhZvc8= Message-ID: <8dbc6f60-dcb7-6a1f-c19e-3eb696c1afa3@linux.microsoft.com> Date: Wed, 24 Nov 2021 20:25:06 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [edk2-devel] [PATCH v4 1/1] .pytool/Plugin/UncrustifyCheck: Add Uncrustify CI plugin From: "Michael Kubacki" To: devel@edk2.groups.io, michael.d.kinney@intel.com Cc: Liming Gao , Sean Brogan , Bret Barkelew Reply-To: devel@edk2.groups.io, mikuback@linux.microsoft.com References: <20211124214131.2705-1-mikuback@linux.microsoft.com> <87b4f4bb-8d19-abdc-85f9-6b7bffa1b12e@linux.microsoft.com> <16BAA253C971EED8.15594@groups.io> In-Reply-To: <16BAA253C971EED8.15594@groups.io> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable I sent the v5 patch with the templates disabled: https://edk2.groups.io/g/devel/message/84068 I also posted that patch on this branch: https://github.com/makubacki/edk2/tree/add_uncrustify_ci_plugin_v5 I posted another branch that also has the commit to enable the templates=20 here: https://github.com/makubacki/edk2/commits/add_uncrustify_ci_plugin_v5_w_tem= plate_enable_commit I will be out of office until Mon Nov. 29th for the US holiday. Thanks, Michael On 11/24/2021 7:24 PM, Michael Kubacki wrote: > Hi Mike, >=20 > How about I quickly send a v5 with the lines commented out and follow up= =20 > with a patch to uncomment them that we can review but merge when ready? >=20 > Thanks, > Michael >=20 > On 11/24/2021 7:16 PM, Michael D Kinney wrote: >> The 2nd option I listed won't work.=C2=A0 That will fail UncrustifyCheck= as=20 >> well because EDK II CI >> will insert missing file/function headers and the files will not match. >> >> We will need to comment out these 2 lines and submit an extra commit=20 >> to re-enable. >> >> Mike >> >>> -----Original Message----- >>> From: Kinney, Michael D >>> Sent: Wednesday, November 24, 2021 4:08 PM >>> To: devel@edk2.groups.io; mikuback@linux.microsoft.com; Kinney,=20 >>> Michael D >>> Cc: Liming Gao ; Sean Brogan=20 >>> ; Bret Barkelew >>> >>> Subject: RE: [edk2-devel] [PATCH v4 1/1]=20 >>> .pytool/Plugin/UncrustifyCheck: Add Uncrustify CI plugin >>> >>> Hi Michael, >>> >>> Unfortunately, enabling the templates in the uncrustify.cfg files=20 >>> modifies 340 files with missing >>> file/function headers that will now fail UncrustifyCheck. >>> >>> =C2=A0=C2=A0=C2=A0=C2=A0 cmt_insert_file_header=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D default_file_header.txt >>> =C2=A0=C2=A0=C2=A0=C2=A0 cmt_insert_func_header=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D default_function_header.txt >>> >>> Perhaps we should leave this feature off to get the uncrustify format= =20 >>> changes committed and >>> enable this feature immediately after so patch reviews after that=20 >>> will slowly fix these missing >>> file/function headers. >>> >>> Or I can comment these two lines out when I generate the final=20 >>> version of the patch series so >>> we don=E2=80=99t have to do an extra commit to re-enable. >>> >>> Mike >>> >>>> -----Original Message----- >>>> From: Kinney, Michael D >>>> Sent: Wednesday, November 24, 2021 3:06 PM >>>> To: devel@edk2.groups.io; mikuback@linux.microsoft.com; Kinney,=20 >>>> Michael D >>>> Cc: Liming Gao ; Sean Brogan=20 >>>> ; Bret Barkelew >>>> >>>> Subject: RE: [edk2-devel] [PATCH v4 1/1]=20 >>>> .pytool/Plugin/UncrustifyCheck: Add Uncrustify CI plugin >>>> >>>> Thanks.=C2=A0 That makes sense. >>>> >>>> Mike >>>> >>>>> -----Original Message----- >>>>> From: devel@edk2.groups.io On Behalf Of=20 >>>>> Michael Kubacki >>>>> Sent: Wednesday, November 24, 2021 2:55 PM >>>>> To: devel@edk2.groups.io; Kinney, Michael D=20 >>>>> >>>>> Cc: Liming Gao ; Sean Brogan=20 >>>>> ; Bret Barkelew >>>>> >>>>> Subject: Re: [edk2-devel] [PATCH v4 1/1]=20 >>>>> .pytool/Plugin/UncrustifyCheck: Add Uncrustify CI plugin >>>>> >>>>> Yes. Those were redundant and detected by the Python configparser=20 >>>>> module >>>>> when I used it to parse the config file. >>>>> >>>>> Thanks, >>>>> Michael >>>>> >>>>> On 11/24/2021 5:45 PM, Michael D Kinney wrote: >>>>>> Hi Michael, >>>>>> >>>>>> I see a couple settings deleted from the uncrustify.cfg.=C2=A0 Was t= hat=20 >>>>>> in purpose?=C2=A0 Does it change the format? >>>>>> >>>>>> >>>>>> -nl_func_call_start_multi_line=C2=A0=C2=A0 =3D true=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 # Whether to add a=20 >>>>>> newline after '(' in a function call if '(' and ')' >>>> are >>>>>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # in different lines. >>>>>> >>>>>> >>>>>> -nl_func_call_args_multi_line=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>> -nl_func_call_args_multi_line_ignore_closures =3D false >>>>>> >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Mike >>>>>> >>>>>>> -----Original Message----- >>>>>>> From: mikuback@linux.microsoft.com >>>>>>> Sent: Wednesday, November 24, 2021 1:42 PM >>>>>>> To: devel@edk2.groups.io >>>>>>> Cc: Kinney, Michael D ; Liming Gao=20 >>>>>>> ; Sean Brogan >>>>>>> ; Bret Barkelew=20 >>>>>>> >>>>>>> Subject: [PATCH v4 1/1] .pytool/Plugin/UncrustifyCheck: Add=20 >>>>>>> Uncrustify CI plugin >>>>>>> >>>>>>> From: Michael Kubacki >>>>>>> >>>>>>> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3748 >>>>>>> >>>>>>> Adds a new CI plugin for Uncrustify. This is used to check >>>>>>> coding standard compliance of source code to the EDK II C Coding >>>>>>> Standards Specification. >>>>>>> >>>>>>> An external dependency is added in the plugin directory to retrieve >>>>>>> the Uncrustify executable. Currently, the executable is from an edk= 2 >>>>>>> fork of the application host in this repository: >>>>>>> >>>>>>> https://dev.azure.com/projectmu/Uncrustify/ >>>>>>> >>>>>>> Note that the Uncrustify application outputs the commit ID that the >>>>>>> application was built from when given the --version parameter. >>>>>>> >>>>>>> This ID can be mapped to the version specified in the Uncrustify CI >>>>>>> plugin external dependency file (uncrustify_ext_dep.yaml) such as >>>>>>> 73.0.3 by visiting the Uncrustify edk2 fork release pipeline page >>>>>>> which associates the NuGet package version with the commit ID it wa= s >>>>>>> built from: >>>>>>> >>>>>>> https://dev.azure.com/projectmu/Uncrustify/_build >>>>>>> >>>>>>> The default Uncrustify configuration files are added in the plugin >>>>>>> directory. Additional details are in the Readme.md file added in >>>>>>> the Uncrustify plugin directory. >>>>>>> >>>>>>> Cc: Michael D Kinney >>>>>>> Cc: Liming Gao >>>>>>> Cc: Sean Brogan >>>>>>> Cc: Bret Barkelew >>>>>>> Signed-off-by: Michael Kubacki >>>>>>> --- >>>>>>> >>>>>>> Notes: >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 V4 changes: >>>>>>> >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1. Updated commit subject to use the= new plugin name. >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2. Enabled file and function header = templates to be placed in >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 files missing a fi= le or function header (comment block). >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 3. Added support to detect whether a= file header or function >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 header is missing = in a file by searching files modified by >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Uncrustify for the= template file text. >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 4. Updated the plugin name displayed= in some log output=20 >>>>>>> messages. >>>>>>> >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 V3 changes: >>>>>>> >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1. Renamed the CI plugin to "Uncrust= ifyCheck" from=20 >>>>>>> "Uncrustify" >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 to follow similar = naming conventions used in other plugins >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 that check files >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2. Added a clarifying paragraph to t= he beginning of the=20 >>>>>>> Uncrustify >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 CI plugin Readme.m= d file that the plugin is enabled by=20 >>>>>>> default >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 and test results c= an be ignored by enabling "AuditOnly"=20 >>>>>>> mode. >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 3. Added instructions in the commit = message on how to map the >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 version reported b= y the Uncrustify application=20 >>>>>>> (--version) to >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 the version specif= ied in the CI plugin external dependency >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 YAML file. >>>>>>> >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 V2 changes: >>>>>>> >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1. Changed plugin temp directory to= =20 >>>>>>> Build/.pytool/Plugin/Uncrustify >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2. Added TCBZ REF in patch commit me= ssage >>>>>>> >>>>>>> =C2=A0=C2=A0 .pytool/Plugin/UncrustifyCheck/Readme.md=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 |=20 >>>>>>> 120 ++++ >>>>>>> =C2=A0=C2=A0 .pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=20 >>>>>>> 617 ++++++++++++++++++++ >>>>>>> =C2=A0=C2=A0 .pytool/Plugin/UncrustifyCheck/default_file_header.txt= =C2=A0=C2=A0=C2=A0=C2=A0 | =20 >>>>>>> 9 + >>>>>>> =C2=A0=C2=A0 .pytool/Plugin/UncrustifyCheck/default_function_header= .txt | =20 >>>>>>> 15 + >>>>>>> =C2=A0=C2=A0 .pytool/Plugin/UncrustifyCheck/uncrustify.cfg=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=20 >>>>>>> 462 +++++++++++++++ >>>>>>> =C2=A0=C2=A0 .pytool/Plugin/UncrustifyCheck/uncrustify_ext_dep.yaml= =C2=A0=C2=A0=C2=A0=C2=A0 | =20 >>>>>>> 16 + >>>>>>> =C2=A0=C2=A0 .pytool/Plugin/UncrustifyCheck/uncrustify_plug_in.yaml= =C2=A0=C2=A0=C2=A0=C2=A0 | =20 >>>>>>> 11 + >>>>>>> =C2=A0=C2=A0 .pytool/Readme.md=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | =20 >>>>>>> 4 + >>>>>>> =C2=A0=C2=A0 8 files changed, 1254 insertions(+) >>>>>>> >>>>>>> diff --git a/.pytool/Plugin/UncrustifyCheck/Readme.md=20 >>>>>>> b/.pytool/Plugin/UncrustifyCheck/Readme.md >>>>>>> new file mode 100644 >>>>>>> index 000000000000..bb263bcc87d7 >>>>>>> --- /dev/null >>>>>>> +++ b/.pytool/Plugin/UncrustifyCheck/Readme.md >>>>>>> @@ -0,0 +1,120 @@ >>>>>>> +# UncrustifyCheck Plugin >>>>>>> + >>>>>>> +This CiBuildPlugin scans all the files in a given package and=20 >>>>>>> checks for coding standard compliance issues. >>>>>>> + >>>>>>> +This plugin is enabled by default. If a package would like to=20 >>>>>>> prevent the plugin from reporting errors, it can do >>>>>>> +so by enabling [`AuditOnly`](#auditonly) mode. >>>>>>> + >>>>>>> +This plugin requires the directory containing the Uncrustify=20 >>>>>>> executable that should be used for this plugin to >>>>>>> +be specified in an environment variable named=20 >>>>>>> `UNCRUSTIFY_CI_PATH`. This unique variable name is used to avoid >>>>> confusion >>>>>>> +with other paths to Uncrustify which might not be the expected=20 >>>>>>> build for use by this plugin. >>>>>>> + >>>>>>> +By default, an Uncrustify configuration file named=20 >>>>>>> "uncrustify.cfg" located in the same directory as the plugin is >>>>>>> +used. The value can be overridden to a package-specific path=20 >>>>>>> with the `ConfigFilePath` configuration file option. >>>>>>> + >>>>>>> +* Uncrustify source code and documentation:=20 >>>>>>> https://github.com/uncrustify/uncrustify >>>>>>> +* Project Mu Uncrustify fork source code and documentation:=20 >>>>>>> https://dev.azure.com/projectmu/Uncrustify >>>>>>> + >>>>>>> +## Files Checked in a Package >>>>>>> + >>>>>>> +By default, this plugin will discover all files in the package=20 >>>>>>> with the following default paths: >>>>>>> + >>>>>>> +```python >>>>>>> +[ >>>>>>> +# C source >>>>>>> +"*.c", >>>>>>> +"*.h" >>>>>>> +] >>>>>>> +``` >>>>>>> + >>>>>>> +From this list of files, any files ignored by Git or residing in= =20 >>>>>>> a Git submodule will be removed. If Git is not >>>>>>> +found, submodules are not found, or ignored files are not found=20 >>>>>>> no changes are made to the list of discovered >>> files. >>>>>>> + >>>>>>> +To control the paths checked in a given package, review the=20 >>>>>>> configuration options described in this file. >>>>>>> + >>>>>>> +## Configuration >>>>>>> + >>>>>>> +The plugin can be configured with a few optional configuration=20 >>>>>>> options. >>>>>>> + >>>>>>> +``` yaml >>>>>>> +=C2=A0 "UncrustifyCheck": { >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AdditionalIncludePaths": [], # Add= itional paths to check=20 >>>>>>> formatting (wildcards supported). >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AuditOnly": False,=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Don't fail the build if=20 >>>>>>> there are errors.=C2=A0 Just log them. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "ConfigFilePath": "",=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Custom path to an=20 >>>>>>> Uncrustify config file. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "IgnoreStandardPaths": [],=C2=A0=C2= =A0=C2=A0 # Standard Plugin defined=20 >>>>>>> paths that should be ignored. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "OutputFileDiffs": False,=C2=A0=C2= =A0=C2=A0=C2=A0 # Output chunks of=20 >>>>>>> formatting diffs in the test case log. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Thi= s can significantly=20 >>>>>>> slow down the plugin on very large packages. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "SkipGitExclusions": False=C2=A0=C2= =A0=C2=A0 # Don't exclude git ignored=20 >>>>>>> files and files in git submodules. >>>>>>> +=C2=A0 } >>>>>>> +``` >>>>>>> + >>>>>>> +### `AdditionalIncludePaths` >>>>>>> + >>>>>>> +A package configuration file can specify any additional paths to= =20 >>>>>>> be included with this option. >>>>>>> + >>>>>>> +At this time, it is recommended all files run against the plugin= =20 >>>>>>> be written in the C or C++ language. >>>>>>> + >>>>>>> +### `AuditOnly` >>>>>>> + >>>>>>> +`Boolean` - Default is `False`. >>>>>>> + >>>>>>> +If `True`, run the test in an "audit only mode" which will log=20 >>>>>>> all errors but instead of failing the build, it >>> will >>>>> set >>>>>>> +the test as skipped. This allows visibility into the failures=20 >>>>>>> without breaking the build. >>>>>>> + >>>>>>> +### `ConfigFilePath` >>>>>>> + >>>>>>> +`String` - Default is `"uncrustify.cfg"` >>>>>>> + >>>>>>> +When specified in the config file, this is a package relative=20 >>>>>>> path to the Uncrustify configuration file. >>>>>>> + >>>>>>> +### `IgnoreStandardPaths` >>>>>>> + >>>>>>> +This plugin by default will check the below standard paths. A=20 >>>>>>> package configuration file can specify any of these >>>>> paths >>>>>>> +to be ignored. >>>>>>> + >>>>>>> +```python >>>>>>> +[ >>>>>>> +# C source >>>>>>> +"*.c", >>>>>>> +"*.h" >>>>>>> +] >>>>>>> +``` >>>>>>> + >>>>>>> +### `OutputFileDiffs` >>>>>>> + >>>>>>> +`Boolean` - Default is `False`. >>>>>>> + >>>>>>> +If `True`, output diffs of formatting changes into the test case= =20 >>>>>>> log. This is helpful to exactly understand what >>>>> changes >>>>>>> +need to be made to the source code in order to fix a coding=20 >>>>>>> standard compliance issue. >>>>>>> + >>>>>>> +Note that calculating the file diffs on a very large set of of=20 >>>>>>> results (e.g. >100 files) can significantly slow >>> down >>>>>>> +plugin execution. >>>>>>> + >>>>>>> +### `SkipGitExclusions` >>>>>>> + >>>>>>> +`Boolean` - Default is `False`. >>>>>>> + >>>>>>> +By default, files in paths matched in a .gitignore file or a=20 >>>>>>> recognized git submodule are excluded. If this option >>>>>>> +is `True`, the plugin will not attempt to recognize these files=20 >>>>>>> and exclude them. >>>>>>> + >>>>>>> +## High-Level Plugin Operation >>>>>>> + >>>>>>> +This plugin generates two main sets of temporary files: >>>>>>> + >>>>>>> +=C2=A0 1. A working directory in the directory=20 >>>>>>> `Build/.pytool/Plugin/Uncrustify` >>>>>>> +=C2=A0 2. For each source file with formatting errors, a sibling f= ile=20 >>>>>>> with the `.uncrustify_plugin` extension >>>>>>> + >>>>>>> +The working directory contains temporary files unique to=20 >>>>>>> operation of the plugin. All of these files are removed >>> on >>>>>>> +exit of the plugin including successful or unsuccessful=20 >>>>>>> execution (such as a Python exception occurring). If for >>> any >>>>>>> +reason, any files in the package exist prior to running the=20 >>>>>>> plugin with the `.uncrustify_plugin` extension, the >>>> plugin >>>>>>> +will inform the user to remove these files and exit before=20 >>>>>>> running Uncrustify. This is to ensure the accuracy of >>> the >>>>>>> +results reported from each execution instance of the plugin. >>>>>>> + >>>>>>> +The plugin determines the list of relevant files to check with=20 >>>>>>> Uncrustify and then invokes Uncrustify with that >>> file >>>>>>> +list. For any files not compliant to the configuration file=20 >>>>>>> provided, Uncrustify will generate a corresponding >>> file >>>>>>> +with the `.uncrustify_plugin` extension. The plugin discovers=20 >>>>>>> all of these files. If any such files are present, >>>> this >>>>>>> +indicates a formatting issue was found and the test is marked=20 >>>>>>> failed (unless `AuditOnly` mode is enabled). >>>>>>> + >>>>>>> +The test case log will contain a report of which files failed to= =20 >>>>>>> format properly, allowing the user to run >>>> Uncrustify >>>>>>> +against the file locally to fix the issue. If the=20 >>>>>>> `OutputFileDiffs` configuration option is set to `True`, the >>>> plugin >>>>>>> +will output diff chunks for all code formatting issues in the=20 >>>>>>> test case log. >>>>>>> diff --git a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py=20 >>>>>>> b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py >>>>>>> new file mode 100644 >>>>>>> index 000000000000..59534469a2d3 >>>>>>> --- /dev/null >>>>>>> +++ b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py >>>>>>> @@ -0,0 +1,617 @@ >>>>>>> +# @file UncrustifyCheck.py >>>>>>> +# >>>>>>> +# An edk2-pytool based plugin wrapper for Uncrustify >>>>>>> +# >>>>>>> +# Copyright (c) Microsoft Corporation. >>>>>>> +# SPDX-License-Identifier: BSD-2-Clause-Patent >>>>>>> +## >>>>>>> +import configparser >>>>>>> +import difflib >>>>>>> +import errno >>>>>>> +import logging >>>>>>> +import os >>>>>>> +import pathlib >>>>>>> +import shutil >>>>>>> +import timeit >>>>>>> +from edk2toolext.environment import version_aggregator >>>>>>> +from edk2toolext.environment.plugin_manager import PluginManager >>>>>>> +from edk2toolext.environment.plugintypes.ci_build_plugin import=20 >>>>>>> ICiBuildPlugin >>>>>>> +from edk2toolext.environment.plugintypes.uefi_helper_plugin=20 >>>>>>> import HelperFunctions >>>>>>> +from edk2toolext.environment.var_dict import VarDict >>>>>>> +from edk2toollib.log.junit_report_format import JunitReportTestCas= e >>>>>>> +from edk2toollib.uefi.edk2.path_utilities import Edk2Path >>>>>>> +from edk2toollib.utility_functions import=C2=A0 RunCmd >>>>>>> +from io import StringIO >>>>>>> +from typing import Any, Dict, List, Tuple >>>>>>> + >>>>>>> +# >>>>>>> +# Provide more user friendly messages for certain scenarios >>>>>>> +# >>>>>>> +class UncrustifyException(Exception): >>>>>>> +=C2=A0=C2=A0=C2=A0 def __init__(self, message, exit_code): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 super().__init__(messag= e) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.exit_code =3D exit= _code >>>>>>> + >>>>>>> + >>>>>>> +class UncrustifyAppEnvVarNotFoundException(UncrustifyException): >>>>>>> +=C2=A0=C2=A0=C2=A0 def __init__(self, message): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 super().__init__(messag= e, -101) >>>>>>> + >>>>>>> + >>>>>>> +class UncrustifyAppVersionErrorException(UncrustifyException): >>>>>>> +=C2=A0=C2=A0=C2=A0 def __init__(self, message): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 super().__init__(messag= e, -102) >>>>>>> + >>>>>>> + >>>>>>> +class UncrustifyAppExecutionException(UncrustifyException): >>>>>>> +=C2=A0=C2=A0=C2=A0 def __init__(self, message): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 super().__init__(messag= e, -103) >>>>>>> + >>>>>>> + >>>>>>> +class=20 >>>>>>> UncrustifyStalePluginFormattedFilesException(UncrustifyException): >>>>>>> +=C2=A0=C2=A0=C2=A0 def __init__(self, message): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 super().__init__(messag= e, -120) >>>>>>> + >>>>>>> + >>>>>>> +class=20 >>>>>>> UncrustifyInputFileCreationErrorException(UncrustifyException): >>>>>>> +=C2=A0=C2=A0=C2=A0 def __init__(self, message): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 super().__init__(messag= e, -121) >>>>>>> + >>>>>>> +class=20 >>>>>>> UncrustifyInvalidIgnoreStandardPathsException(UncrustifyException): >>>>>>> +=C2=A0=C2=A0=C2=A0 def __init__(self, message): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 super().__init__(messag= e, -122) >>>>>>> + >>>>>>> +class UncrustifyGitIgnoreFileException(UncrustifyException): >>>>>>> +=C2=A0=C2=A0=C2=A0 def __init__(self, message): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 super().__init__(messag= e, -140) >>>>>>> + >>>>>>> + >>>>>>> +class UncrustifyGitSubmoduleException(UncrustifyException): >>>>>>> +=C2=A0=C2=A0=C2=A0 def __init__(self, message): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 super().__init__(messag= e, -141) >>>>>>> + >>>>>>> + >>>>>>> +class UncrustifyCheck(ICiBuildPlugin): >>>>>>> +=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0 A CiBuildPlugin that uses Uncrustify to check t= he source=20 >>>>>>> files in the >>>>>>> +=C2=A0=C2=A0=C2=A0 package being tested for coding standard issues= . >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 By default, the plugin runs against standard C = source file=20 >>>>>>> extensions but >>>>>>> +=C2=A0=C2=A0=C2=A0 its configuration can be modified through its c= onfiguration=20 >>>>>>> file. >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 Configuration options: >>>>>>> +=C2=A0=C2=A0=C2=A0 "UncrustifyCheck": { >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AdditionalIncludePaths= ": [], # Additional paths to=20 >>>>>>> check formatting (wildcards supported). >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AuditOnly": False,=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Don't fail the = build if=20 >>>>>>> there are errors.=C2=A0 Just log them. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "ConfigFilePath": "",= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Custom path to an=20 >>>>>>> Uncrustify config file. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "IgnoreStandardPaths": = [],=C2=A0=C2=A0=C2=A0 # Standard Plugin defined=20 >>>>>>> paths that should be ignored. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "OutputFileDiffs": Fals= e,=C2=A0=C2=A0=C2=A0=C2=A0 # Output chunks of=20 >>>>>>> formatting diffs in the test case log. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # This can significantly=20 >>>>>>> slow down the plugin on very large packages. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "SkipGitExclusions": Fa= lse=C2=A0=C2=A0=C2=A0 # Don't exclude git=20 >>>>>>> ignored files and files in git submodules. >>>>>>> +=C2=A0=C2=A0=C2=A0 } >>>>>>> +=C2=A0=C2=A0=C2=A0 """ >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 # >>>>>>> +=C2=A0=C2=A0=C2=A0 # By default, use an "uncrustify.cfg" config fi= le in the=20 >>>>>>> plugin directory >>>>>>> +=C2=A0=C2=A0=C2=A0 # A package can override this path via "ConfigF= ilePath" >>>>>>> +=C2=A0=C2=A0=C2=A0 # >>>>>>> +=C2=A0=C2=A0=C2=A0 # Note: Values specified via "ConfigFilePath" a= re relative=20 >>>>>>> to the package >>>>>>> +=C2=A0=C2=A0=C2=A0 # >>>>>>> +=C2=A0=C2=A0=C2=A0 DEFAULT_CONFIG_FILE_PATH =3D os.path.join( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pathlib.Path(__file__).= parent.resolve(), "uncrustify.cfg") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 # >>>>>>> +=C2=A0=C2=A0=C2=A0 # The extension used for formatted files produc= ed by this=20 >>>>>>> plugin >>>>>>> +=C2=A0=C2=A0=C2=A0 # >>>>>>> +=C2=A0=C2=A0=C2=A0 FORMATTED_FILE_EXTENSION =3D ".uncrustify_plugi= n" >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 # >>>>>>> +=C2=A0=C2=A0=C2=A0 # A package can add any additional paths with= =20 >>>>>>> "AdditionalIncludePaths" >>>>>>> +=C2=A0=C2=A0=C2=A0 # A package can remove any of these paths with= =20 >>>>>>> "IgnoreStandardPaths" >>>>>>> +=C2=A0=C2=A0=C2=A0 # >>>>>>> +=C2=A0=C2=A0=C2=A0 STANDARD_PLUGIN_DEFINED_PATHS =3D ("*.c", "*.h"= ) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 # >>>>>>> +=C2=A0=C2=A0=C2=A0 # The Uncrustify application path should set in= this=20 >>>>>>> environment variable >>>>>>> +=C2=A0=C2=A0=C2=A0 # >>>>>>> +=C2=A0=C2=A0=C2=A0 UNCRUSTIFY_PATH_ENV_KEY =3D "UNCRUSTIFY_CI_PATH= " >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def GetTestName(self, packagename: str, environ= ment:=20 >>>>>>> VarDict) -> Tuple: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ Provide the testcas= e name and classname for use in=20 >>>>>>> reporting >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= Args: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 packagename: string containing name of package to=20 >>>>>>> build >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 environment: The VarDict for the test to run in >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= Returns: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 A tuple containing the testcase name and the=20 >>>>>>> classname >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 (testcasename, classname) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 testclassname: a descriptive string for the=20 >>>>>>> testcase can include whitespace >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 classname: should be patterned=20 >>>>>>> .. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return ("Check file cod= ing standard compliance in " +=20 >>>>>>> packagename, packagename + ".UncrustifyCheck") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def RunBuildPlugin(self, package_rel_path: str,= edk2_path:=20 >>>>>>> Edk2Path, package_config: Dict[str, List[str]], >>>>>>> environment_config: Any, plugin_manager: PluginManager,=20 >>>>>>> plugin_manager_helper: HelperFunctions, tc: >>>>> JunitReportTestCase, >>>>>>> output_stream=3DNone) -> int: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 External function of pl= ugin. This function is used to=20 >>>>>>> perform the task of the CiBuild Plugin. >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Args: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - package_r= el_path: edk2 workspace relative path to=20 >>>>>>> the package >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - edk2_path= : Edk2Path object with workspace and=20 >>>>>>> packages paths >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - package_c= onfig: Dictionary with the package=20 >>>>>>> configuration >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - environme= nt_config: Environment configuration >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - plugin_ma= nager: Plugin Manager Instance >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - plugin_ma= nager_helper: Plugin Manager Helper Instance >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - tc: JUnit= test case >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - output_st= ream: The StringIO output stream from this=20 >>>>>>> plugin (logging) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Returns >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >0 : Number= of errors found >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0=C2=A0 : P= assed successfully >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -1 : Skippe= d for missing prereq >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 try: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= # Initialize plugin and check pre-requisites. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._initialize_environment_info( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 package_rel_path, edk2_path, package_config, tc) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._initialize_configuration() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._check_for_preexisting_formatted_files() >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= # Log important context information. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._log_uncrustify_app_info() >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= # Get template file contents if specified >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._get_template_file_contents() >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= # Create meta input files & directories >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._create_temp_working_directory() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._create_uncrustify_file_list_file() >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._run_uncrustify() >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= # Post-execution actions. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._process_uncrustify_results() >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 except UncrustifyExcept= ion as e: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._tc.LogStdError( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 f"Uncrustify error {e.exit_code}.=20 >>>>>>> Details:\n\n{str(e)}") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= logging.warning( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 f"Uncrustify error {e.exit_code}.=20 >>>>>>> Details:\n\n{str(e)}") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= return -1 >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 else: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= if self._formatted_file_error_count > 0: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 if self._audit_only_mode: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 logging.info( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "S= etting test as skipped since AuditOnly=20 >>>>>>> is enabled") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._tc.SetSkipped() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return -1 >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 else: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._tc.SetFailed( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 f"= {self._plugin_name} failed due to=20 >>>>>>> {self._formatted_file_error_count} incorrectly >>> formatted >>>>>>> files.", "CHECK_FAILED") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= else: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 self._tc.SetSuccess() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= return self._formatted_file_error_count >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 finally: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._cleanup_temporary_formatted_files() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._cleanup_temporary_directory() >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _initialize_configuration(self) -> None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Initializes plugin conf= iguration. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._initialize_app_in= fo() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._initialize_config= _file_info() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._initialize_file_t= o_format_info() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._initialize_test_c= ase_output_options() >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _check_for_preexisting_formatted_files(self= ) -> None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Checks if any formatted= files from prior execution are=20 >>>>>>> present. >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Existence of such files= is an unexpected condition. This=20 >>>>>>> might result >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 from an error that occu= rred during a previous run or a=20 >>>>>>> premature exit from a debug scenario. In any case, >>>> the >>>>>>> package should be clean before starting a new run. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pre_existing_formatted_= file_count =3D len( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= [str(path.resolve()) for path in >>>>>>> pathlib.Path(self._abs_package_path).rglob(f'*{UncrustifyCheck.FORM= ATTED_FILE_EXTENSION}')])=20 >>>>>>> >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if pre_existing_formatt= ed_file_count > 0: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= raise UncrustifyStalePluginFormattedFilesException( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 f"{pre_existing_formatted_file_count} formatted=20 >>>>>>> files already exist. To prevent overwriting these >>>>> files, >>>>>>> please remove them before running this plugin.") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _cleanup_temporary_directory(self) -> None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Cleans up the temporary= directory used for this=20 >>>>>>> execution instance. >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 This removes the direct= ory and all files created during=20 >>>>>>> this instance. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if hasattr(self, '_work= ing_dir'): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._remove_tree(self._working_dir) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _cleanup_temporary_formatted_files(self) ->= None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Cleans up the temporary= formmatted files produced by=20 >>>>>>> Uncrustify. >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 This will recursively r= emove all formatted files=20 >>>>>>> generated by Uncrustify >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 during this execution i= nstance. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if hasattr(self, '_abs_= package_path'): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= formatted_files =3D [str(path.resolve()) for path in=20 >>>>>>> pathlib.Path( >>>>>>> + =20 >>>>>>> self._abs_package_path).rglob(f'*{UncrustifyCheck.FORMATTED_FILE_EX= TENSION}')]=20 >>>>>>> >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= for formatted_file in formatted_files: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 os.remove(formatted_file) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _create_temp_working_directory(self) -> Non= e: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Creates the temporary d= irectory used for this execution=20 >>>>>>> instance. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._working_dir =3D o= s.path.join( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._abs_workspace_path, "Build", ".pytool",=20 >>>>>>> "Plugin", f"{self._plugin_name}") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 try: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= pathlib.Path(self._working_dir).mkdir(parents=3DTrue,=20 >>>>>>> exist_ok=3DTrue) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 except OSError as e: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= raise UncrustifyInputFileCreationErrorException( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 f"Error creating plugin directory=20 >>>>>>> {self._working_dir}.\n\n{repr(e)}.") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _create_uncrustify_file_list_file(self) -> = None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Creates the file with t= he list of source files for=20 >>>>>>> Uncrustify to process. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._app_input_file_pa= th =3D os.path.join( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._working_dir, "uncrustify_file_list.txt") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 with open(self._app_inp= ut_file_path, 'w',=20 >>>>>>> encoding=3D'utf8') as f: >>>>>>> + =20 >>>>>>> f.writelines(f"\n".join(self._abs_file_paths_to_format)) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _execute_uncrustify(self) -> None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Executes Uncrustify wit= h the initialized configuration. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 output =3D StringIO() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._app_exit_code =3D= RunCmd( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._app_path, >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= f"-c {self._app_config_file} -F=20 >>>>>>> {self._app_input_file_path} --if-changed --suffix >>>>>>> {UncrustifyCheck.FORMATTED_FILE_EXTENSION}", outstream=3Doutput) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._app_output =3D ou= tput.getvalue().strip().splitlines() >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _get_git_ignored_paths(self) -> List[str]: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """" >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Returns a list of file = absolute path strings to all=20 >>>>>>> files ignored in this git repository. >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 If git is not found, an= empty list will be returned. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if not shutil.which("gi= t"): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= logging.warn( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 "Git is not found on this system. Git submodule=20 >>>>>>> paths will not be considered.") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= return [] >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 outstream_buffer =3D St= ringIO() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 exit_code =3D RunCmd("g= it", "ls-files --other", >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 workingdir=3Dself._abs_workspace_path,=20 >>>>>>> outstream=3Doutstream_buffer, >>>>> logging_level=3Dlogging.NOTSET) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (exit_code !=3D 0): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= raise UncrustifyGitIgnoreFileException( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 f"An error occurred reading git ignore settings.= =20 >>>>>>> This will prevent Uncrustify from running against >>>> the >>>>>>> expected set of files.") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Note: This will poten= tially be a large list, but at=20 >>>>>>> least sorted >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return outstream_buffer= .getvalue().strip().splitlines() >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _get_git_submodule_paths(self) -> List[str]= : >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Returns a list of direc= tory absolute path strings to the=20 >>>>>>> root of each submodule in the workspace >>> repository. >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 If git is not found, an= empty list will be returned. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if not shutil.which("gi= t"): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= logging.warn( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 "Git is not found on this system. Git submodule=20 >>>>>>> paths will not be considered.") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= return [] >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if os.path.isfile(os.pa= th.join(self._abs_workspace_path,=20 >>>>>>> ".gitmodules")): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= logging.info( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 f".gitmodules file found. Excluding submodules=20 >>>>>>> in {self._package_name}.") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= outstream_buffer =3D StringIO() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= exit_code =3D RunCmd("git", "config --file .gitmodules=20 >>>>>>> --get-regexp path", >>>>> workingdir=3Dself._abs_workspace_path, >>>>>>> outstream=3Doutstream_buffer, logging_level=3Dlogging.NOTSET) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= if (exit_code !=3D 0): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 raise UncrustifyGitSubmoduleException( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 f".gitmodule file detected= but an error=20 >>>>>>> occurred reading the file. Cannot proceed with unknown >>>>>>> submodule paths.") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= submodule_paths =3D [] >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= for line in=20 >>>>>>> outstream_buffer.getvalue().strip().splitlines(): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 submodule_paths.append( >>>>>>> + =20 >>>>>>> os.path.normpath(os.path.join(self._abs_workspace_path,=20 >>>>>>> line.split()[1]))) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= return submodule_paths >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 else: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= return [] >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _get_template_file_contents(self) -> None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Gets the contents of Un= crustify template files if they=20 >>>>>>> are specified >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 in the Uncrustify confi= guration file. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._file_template_con= tents =3D None >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._func_template_con= tents =3D None >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Allow no value to all= ow "set" statements in the config=20 >>>>>>> file which do >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # not specify value ass= ignment >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 parser =3D configparser= .ConfigParser(allow_no_value=3DTrue) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 with open(self._app_con= fig_file, 'r') as cf: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= parser.read_string("[dummy_section]\n" + cf.read()) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 try: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= file_template_name =3D=20 >>>>>>> parser["dummy_section"]["cmt_insert_file_header"] >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= file_template_path =3D pathlib.Path(file_template_name) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= if not file_template_path.is_file(): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 file_template_path =3D=20 >>>>>>> pathlib.Path(os.path.join(self._plugin_path, file_template_name)) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 self._file_template_contents =3D=20 >>>>>>> file_template_path.read_text() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 except KeyError: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= logging.warn("A file header template is not=20 >>>>>>> specified in the config file.") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 except FileNotFoundErro= r: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= logging.warn("The specified file header template=20 >>>>>>> file was not found.") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 try: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= func_template_name =3D=20 >>>>>>> parser["dummy_section"]["cmt_insert_func_header"] >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= func_template_path =3D pathlib.Path(func_template_name) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= if not func_template_path.is_file(): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 func_template_path =3D=20 >>>>>>> pathlib.Path(os.path.join(self._plugin_path, func_template_name)) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 self._func_template_contents =3D=20 >>>>>>> func_template_path.read_text() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 except KeyError: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= logging.warn("A function header template is not=20 >>>>>>> specified in the config file.") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 except FileNotFoundErro= r: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= logging.warn("The specified function header template=20 >>>>>>> file was not found.") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _initialize_app_info(self) -> None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Initialize Uncrustify a= pplication information. >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 This function will dete= rmine the application path and=20 >>>>>>> version. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Verify Uncrustify is = specified in the environment. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if UncrustifyCheck.UNCR= USTIFY_PATH_ENV_KEY not in=20 >>>>>>> os.environ: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= raise UncrustifyAppEnvVarNotFoundException( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 f"Uncrustify environment variable=20 >>>>>>> {UncrustifyCheck.UNCRUSTIFY_PATH_ENV_KEY} is not present.") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._app_path =3D shut= il.which('uncrustify',=20 >>>>>>> path=3Dos.environ[UncrustifyCheck.UNCRUSTIFY_PATH_ENV_KEY]) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if self._app_path is No= ne: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= raise FileNotFoundError( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 errno.ENOENT, os.strerror(errno.ENOENT),=20 >>>>>>> self._app_path) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._app_path =3D=20 >>>>>>> os.path.normcase(os.path.normpath(self._app_path)) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if not os.path.isfile(s= elf._app_path): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= raise FileNotFoundError( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 errno.ENOENT, os.strerror(errno.ENOENT),=20 >>>>>>> self._app_path) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Verify Uncrustify is = present at the expected path. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return_buffer =3D Strin= gIO() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ret =3D RunCmd(self._ap= p_path, "--version",=20 >>>>>>> outstream=3Dreturn_buffer) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (ret !=3D 0): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= raise UncrustifyAppVersionErrorException( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 f"Error occurred executing --version: {ret}.") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Log Uncrustify versio= n information. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._app_version =3D r= eturn_buffer.getvalue().strip() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._tc.LogStdOut(f"Un= crustify version:=20 >>>>>>> {self._app_version}") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 version_aggregator.GetV= ersionAggregator().ReportVersion( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= "Uncrustify", self._app_version,=20 >>>>>>> version_aggregator.VersionTypes.INFO) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _initialize_config_file_info(self) -> None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Initialize Uncrustify c= onfiguration file info. >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The config file path is= relative to the package root. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._app_config_file = =3D=20 >>>>>>> UncrustifyCheck.DEFAULT_CONFIG_FILE_PATH >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if "ConfigFilePath" in = self._package_config: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._app_config_file =3D=20 >>>>>>> self._package_config["ConfigFilePath"].strip() >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._app_config_file =3D os.path.normpath( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 os.path.join(self._abs_package_path,=20 >>>>>>> self._app_config_file)) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if not os.path.isfile(s= elf._app_config_file): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= raise FileNotFoundError( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 errno.ENOENT, os.strerror(errno.ENOENT),=20 >>>>>>> self._app_config_file) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _initialize_environment_info(self, package_= rel_path:=20 >>>>>>> str, edk2_path: Edk2Path, package_config: Dict[str, >>>>>>> List[str]], tc: JunitReportTestCase) -> None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Initializes plugin envi= ronment information. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._abs_package_path = =3D=20 >>>>>>> edk2_path.GetAbsolutePathOnThisSytemFromEdk2RelativePath( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= package_rel_path) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._abs_workspace_pat= h =3D edk2_path.WorkspacePath >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._package_config = =3D package_config >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._package_name =3D = os.path.basename( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= os.path.normpath(package_rel_path)) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._plugin_name =3D s= elf.__class__.__name__ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._plugin_path =3D= =20 >>>>>>> os.path.dirname(os.path.realpath(__file__)) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._rel_package_path = =3D package_rel_path >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._tc =3D tc >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _initialize_file_to_format_info(self) -> No= ne: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Forms the list of sourc= e files for Uncrustify to process. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Create a list of all = the package relative file paths=20 >>>>>>> in the package to run against Uncrustify. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rel_file_paths_to_forma= t =3D list( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= UncrustifyCheck.STANDARD_PLUGIN_DEFINED_PATHS) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Allow the ci.yaml to = remove any of the pre-defined=20 >>>>>>> standard paths >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if "IgnoreStandardPaths= " in self._package_config: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= for a in self._package_config["IgnoreStandardPaths"]: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 if a.strip() in rel_file_paths_to_format: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._tc.LogStdOut( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 f"= Ignoring standard path due to ci.yaml=20 >>>>>>> ignore: {a}") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rel_file_paths_to_format.r= emove(a.strip()) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 else: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 raise=20 >>>>>>> UncrustifyInvalidIgnoreStandardPathsException(f"Invalid=20 >>>>>>> IgnoreStandardPaths value: {a}") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Allow the ci.yaml to = specify additional include paths=20 >>>>>>> for this package >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if "AdditionalIncludePa= ths" in self._package_config: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= rel_file_paths_to_format.extend( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 self._package_config["AdditionalIncludePaths"]) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._abs_file_paths_to= _format =3D [] >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for path in rel_file_pa= ths_to_format: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._abs_file_paths_to_format.extend( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 [str(path.resolve()) for path in=20 >>>>>>> pathlib.Path(self._abs_package_path).rglob(path)]) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if not "SkipGitExclusio= ns" in self._package_config or=20 >>>>>>> not self._package_config["SkipGitExclusions"]: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= # Remove files ignored by git >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= logging.info( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 f"{self._package_name} file count before git=20 >>>>>>> ignore file exclusion: >>>>>>> {len(self._abs_file_paths_to_format)}") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ignored_paths =3D self._get_git_ignored_paths() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._abs_file_paths_to_format =3D list( >>>>>>> + =20 >>>>>>> set(self._abs_file_paths_to_format).difference(ignored_paths)) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= logging.info( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 f"{self._package_name} file count after git=20 >>>>>>> ignore file exclusion: >>>>>>> {len(self._abs_file_paths_to_format)}") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= # Remove files in submodules >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= logging.info( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 f"{self._package_name} file count before=20 >>>>>>> submodule exclusion: >>>> {len(self._abs_file_paths_to_format)}") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= submodule_paths =3D=20 >>>>>>> tuple(self._get_git_submodule_paths()) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= for path in submodule_paths: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 logging.info(f"=C2=A0 submodule path: {path}") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._abs_file_paths_to_format =3D [ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 f for f in self._abs_file_paths_to_format if not= =20 >>>>>>> f.startswith(submodule_paths)] >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= logging.info( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 f"{self._package_name} file count after=20 >>>>>>> submodule exclusion: >>> {len(self._abs_file_paths_to_format)}") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Sort the files for mo= re consistent results >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._abs_file_paths_to= _format.sort() >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _initialize_test_case_output_options(self) = -> None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Initializes options tha= t influence test case output. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._audit_only_mode = =3D False >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._output_file_diffs= =3D False >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if "AuditOnly" in self.= _package_config and=20 >>>>>>> self._package_config["AuditOnly"]: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._audit_only_mode =3D True >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if "OutputFileDiffs" in= self._package_config and=20 >>>>>>> self._package_config["OutputFileDiffs"]: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._output_file_diffs =3D True >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _log_uncrustify_app_info(self) -> None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Logs Uncrustify applica= tion information. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._tc.LogStdOut(f"Fo= und Uncrustify at {self._app_path}") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._tc.LogStdOut(f"Un= crustify version:=20 >>>>>>> {self._app_version}") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._tc.LogStdOut('\n'= ) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 logging.info(f"Found Un= crustify at {self._app_path}") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 logging.info(f"Uncrusti= fy version: {self._app_version}") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 logging.info('\n') >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _process_uncrustify_results(self) -> None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Process the results fro= m Uncrustify. >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Determines whether form= atting errors are present and=20 >>>>>>> logs failures. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 formatted_files =3D [st= r(path.resolve()) for path in=20 >>>>>>> pathlib.Path( >>>>>>> + =20 >>>>>>> self._abs_package_path).rglob(f'*{UncrustifyCheck.FORMATTED_FILE_EX= TENSION}')]=20 >>>>>>> >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._formatted_file_er= ror_count =3D len(formatted_files) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if self._formatted_file= _error_count > 0: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= self._tc.LogStdError("Files with formatting errors:\n") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= if self._output_file_diffs: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 logging.info("Calculating file diffs. This might= =20 >>>>>>> take a while...") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for formatted_file in f= ormatted_files: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= pre_formatted_file =3D formatted_file[:- >>>>>>> + =20 >>>>>>> len(UncrustifyCheck.FORMATTED_FILE_EXTENSION)] >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= if (self._output_file_diffs or >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._file_template_conten= ts is not None or >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._func_template_conten= ts is not None): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 self._tc.LogStdError( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 f"Formatting errors in=20 >>>>>>> {os.path.relpath(pre_formatted_file, self._abs_package_path)}\n") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 with open(formatted_file) as ff: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 formatted_file_text =3D ff= .read() >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (self._file_template_co= ntents is not None=20 >>>>>>> and >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 self._file_template_contents in=20 >>>>>>> formatted_file_text): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 se= lf._tc.LogStdError(f"File header is=20 >>>>>>> missing in {os.path.relpath(pre_formatted_file, >>>>>>> self._abs_package_path)}\n") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (self._func_template_co= ntents is not None=20 >>>>>>> and >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 self._func_template_contents in=20 >>>>>>> formatted_file_text): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 se= lf._tc.LogStdError(f"A function header=20 >>>>>>> is missing in >>> {os.path.relpath(pre_formatted_file, >>>>>>> self._abs_package_path)}\n") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if self._output_file_diffs= : >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 wi= th open(pre_formatted_file) as pf: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 pre_formatted_file_text =3D pf.read() >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fo= r line in=20 >>>>>>> difflib.unified_diff(pre_formatted_file_text.split('\n'), >>>>>>> formatted_file_text.split('\n'), fromfile=3Dpre_formatted_file,=20 >>>>>>> tofile=3Dformatted_file, n=3D3): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 self._tc.LogStdError(line) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 se= lf._tc.LogStdError('\n') >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= else: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 self._tc.LogStdError(pre_formatted_file) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _remove_tree(self, dir_path: str, ignore_er= rors: bool =3D=20 >>>>>>> False) -> None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Helper for removing a d= irectory. Over time there have been >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 many private implementa= tions of this due to reliability=20 >>>>>>> issues in the >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 shutil implementations.= To consolidate on a single=20 >>>>>>> function this helper is added. >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 On error try to change = file attributes. Also add retry=20 >>>>>>> logic. >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 This function is tempor= arily borrowed from=20 >>>>>>> edk2toollib.utility_functions >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 since the version used = in edk2 is not recent enough to=20 >>>>>>> include the >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 function. >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 This function should be= replaced by "RemoveTree" when it=20 >>>>>>> is available. >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Args: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - dir_path:= Path to directory to remove. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - ignore_er= rors: Whether to ignore errors during removal >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 def _remove_readonly(fu= nc, path, _): >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= Private function to attempt to change permissions on=20 >>>>>>> file/folder being deleted. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= os.chmod(path, os.stat.S_IWRITE) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= func(path) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for _ in range(3):=C2= =A0 # retry up to 3 times >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= try: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 shutil.rmtree(dir_path,=20 >>>>>>> ignore_errors=3Dignore_errors, onerror=3D_remove_readonly) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= except OSError as err: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 logging.warning(f"Failed to fully remove=20 >>>>>>> {dir_path}: {err}") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= else: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 break >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 else: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= raise RuntimeError(f"Failed to remove {dir_path}") >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0 def _run_uncrustify(self) -> None: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Runs Uncrustify for thi= s instance of plugin execution. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 logging.info("Executing= Uncrustify. This might take a=20 >>>>>>> while...") >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 start_time =3D timeit.d= efault_timer() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._execute_uncrustif= y() >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 end_time =3D timeit.def= ault_timer() - start_time >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 execution_summary =3D f= "Uncrustify executed against=20 >>>>>>> {len(self._abs_file_paths_to_format)} files in >>>>>>> {self._package_name} in {end_time:.2f} seconds.\n" >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self._tc.LogStdOut(exec= ution_summary) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 logging.info(execution_= summary) >>>>>>> + >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if self._app_exit_code = !=3D 0 and self._app_exit_code !=3D 1: >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= raise UncrustifyAppExecutionException( >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 f"Error {str(self._app_exit_code)} returned from= =20 >>>>>>> Uncrustify:\n\n{str(self._app_output)}") >>>>>>> diff --git a/.pytool/Plugin/UncrustifyCheck/default_file_header.txt >>>>>>> b/.pytool/Plugin/UncrustifyCheck/default_file_header.txt >>>>>>> new file mode 100644 >>>>>>> index 000000000000..2955a734dfe1 >>>>>>> --- /dev/null >>>>>>> +++ b/.pytool/Plugin/UncrustifyCheck/default_file_header.txt >>>>>>> @@ -0,0 +1,9 @@ >>>>>>> +/** @file >>>>>>> +=C2=A0 Brief description of the file's purpose. >>>>>>> + >>>>>>> +=C2=A0 Detailed description of the file's contents and other usefu= l >>>>>>> +=C2=A0 information for a person viewing the file for the first tim= e. >>>>>>> + >>>>>>> +=C2=A0 <> >>>>>>> +=C2=A0 SPDX-License-Identifier: BSD-2-Clause-Patent >>>>>>> +**/ >>>>>>> diff --git=20 >>>>>>> a/.pytool/Plugin/UncrustifyCheck/default_function_header.txt >>>>>>> b/.pytool/Plugin/UncrustifyCheck/default_function_header.txt >>>>>>> new file mode 100644 >>>>>>> index 000000000000..66edc72e6731 >>>>>>> --- /dev/null >>>>>>> +++ b/.pytool/Plugin/UncrustifyCheck/default_function_header.txt >>>>>>> @@ -0,0 +1,15 @@ >>>>>>> +/** >>>>>>> +=C2=A0 Brief description of this function's purpose. >>>>>>> + >>>>>>> +=C2=A0 Follow it immediately with the detailed description. >>>>>>> + >>>>>>> +=C2=A0 @param[in]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Arg1=C2=A0 Descrip= tion of Arg1. >>>>>>> +=C2=A0 @param[in]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Arg2=C2=A0 Descrip= tion of Arg2 This is complicated=20 >>>>>>> and requires >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mu= ltiple lines to describe. >>>>>>> +=C2=A0 @param[out]=C2=A0=C2=A0=C2=A0=C2=A0 Arg3=C2=A0 Description = of Arg3. >>>>>>> +=C2=A0 @param[in, out] Arg4=C2=A0 Description of Arg4. >>>>>>> + >>>>>>> +=C2=A0 @retval VAL_ONE=C2=A0 Description of what VAL_ONE signifies= . >>>>>>> +=C2=A0 @retval OTHER=C2=A0=C2=A0=C2=A0 This is the only other retu= rn value. If there=20 >>>>>>> were other >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return values, they would be lis= ted. >>>>>>> +**/ >>>>>>> diff --git a/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg=20 >>>>>>> b/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg >>>>>>> new file mode 100644 >>>>>>> index 000000000000..1a87295ec9f9 >>>>>>> --- /dev/null >>>>>>> +++ b/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg >>>>>>> @@ -0,0 +1,462 @@ >>>>>>> +## @file >>>>>>> +# Uncrustify Configuration File for EDK II C Code >>>>>>> +# >>>>>>> +# Coding Standard:=20 >>>>>>> https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specificatio= n/=20 >>>>>>> >>>>>>> +# >>>>>>> +# This configuration file is meant to be a "best attempt" to=20 >>>>>>> align with the >>>>>>> +# definitions in the EDK II C Coding Standards Specification. >>>>>>> +# >>>>>>> +# Copyright (c) Microsoft Corporation. >>>>>>> +# SPDX-License-Identifier: BSD-2-Clause-Patent >>>>>>> +## >>>>>>> + >>>>>>> +# Force UTF-8 encoding (no UTF-16) >>>>>>> +enable_digraphs=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +utf8_byte=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D false >>>>>>> +utf8_force=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = =3D true >>>>>>> + >>>>>>> +# Code width / line splitting >>>>>>> +#code_width=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = =3D120=C2=A0=C2=A0=C2=A0=C2=A0 # TODO: This causes=20 >>>>>>> non-deterministic behaviour in some cases when code >>>>> wraps >>>>>>> +ls_code_width=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3Dfalse >>>>>>> +ls_for_split_full=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3Dtrue >>>>>>> +ls_func_split_full=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3Dtrue >>>>>>> +pos_comma=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3Dtrail >>>>>>> + >>>>>>> +# 5.1.7=C2=A0 All files must end with CRLF >>>>>>> +newlines=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D crlf >>>>>>> + >>>>>>> +# 5.1.2 Do not use tab characters >>>>>>> + >>>>>>> +cmt_convert_tab_to_spaces=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D = true=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Whether to convert=20 >>>>>>> all tabs to spaces in comments. If false, tabs in >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # comments are left=20 >>>>>>> alone, unless used for indenting. >>>>>>> +indent_columns=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Number of spaces=20 >>>>>>> for indentation >>>>>>> +indent_with_tabs=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 # Do not use TAB=20 >>>>>>> characters >>>>>>> +string_replace_tab_chars=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D true=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Replace TAB with=20 >>>>>>> SPACE >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Note: This will=20 >>>>>>> break .robot files but is needed for edk2 style >>>>>>> + >>>>>>> +# 5.2.1.1 There shall be only one statement on a line (statement= =20 >>>>>>> ends with ;) >>>>>>> +nl_multi_line_cond=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Add= a newline=20 >>>>>>> between ')' and '{' if the ')' is on a different line >>>> than >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # the if/for/etc. >>>>>>> +nl_after_semicolon=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Whe= ther to add a=20 >>>>>>> newline after semicolons, except in 'for' >>> statements. >>>>>>> + >>>>>>> +# 5.2.1.3 An open brace '{' goes on the same line as the closing= =20 >>>>>>> parenthesis ')' of simple predicate expressions >>>>>>> +mod_full_brace_do=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> braces on a single-line 'do' statement. >>>>>>> +mod_full_brace_for=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +mod_full_brace_function=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> braces on a single-line function definition. >>>>>>> +mod_full_brace_if=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> braces on a single-line 'if' statement. Braces will >>> not >>>> be >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # removed if the=20 >>>>>>> braced statement contains an 'else'. >>>>>>> +mod_full_brace_if_chain=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D false >>>>>>> +mod_full_brace_while=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> + >>>>>>> +# 5.2.1.4 A close brace '}' always goes at the beginning of the=20 >>>>>>> last line of the body >>>>>>> +eat_blanks_after_open_brace=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +eat_blanks_before_close_brace=C2=A0=C2=A0 =3D true=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 # Whether to remove=20 >>>>>>> blank lines before '}'. >>>>>>> + >>>>>>> +# 5.2.2.2 Always put space before and after binary operators. >>>>>>> +sp_assign=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space around assignment operator '=3D', '+=3D', etc. >>>>>>> +sp_assign_default=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +sp_bool=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space around boolean operators '&&' and '||'. >>>>>>> +sp_compare=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space around compare operator '<', '>', '=3D=3D', etc. >>>>>>> + >>>>>>> +# 5.2.2.3 Do not put space between unary operators and their objec= t >>>>>>> +sp_addr=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # A or remove space=20 >>>>>>> after the '&' (address-of) unary operator. >>>>>>> +sp_incdec=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D remove=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space between '++' and '--' the word to which it is >>>> being >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # applied, as in=20 >>>>>>> '(--x)' or 'y++;'. >>>>>>> +sp_inv=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space after the '~' (invert) unary operator. >>>>>>> +sp_not=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space after the '!' (not) unary operator. >>>>>>> +sp_sign=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space after '+' or '-', as in 'x =3D -5' or 'y =3D +7'. >>>>>>> + >>>>>>> +# 5.2.2.4 Subsequent lines of multi-line function calls should=20 >>>>>>> line up two spaces from the beginning of the >>> function >>>>>>> +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 name >>>>>>> +nl_func_call_args_multi_line=C2=A0=C2=A0=C2=A0 =3D true=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 # Whether to add a=20 >>>>>>> newline after each ',' in a function call if '(' >>> and >>>>> ')' >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # are in different=20 >>>>>>> lines. >>>>>>> +nl_func_call_args_multi_line_ignore_closures =3D false >>>>>>> + >>>>>>> +# - Indent each argument 2 spaces from the start of the function= =20 >>>>>>> name. If a >>>>>>> +#=C2=A0=C2=A0 function is called through a structure or union memb= er, of type >>>>>>> +#=C2=A0=C2=A0 pointer-to-function, then indent each argument 2 spa= ces from=20 >>>>>>> the start of the >>>>>>> +#=C2=A0=C2=A0 member name. >>>>>>> +indent_func_call_edk2_style=C2=A0=C2=A0=C2=A0=C2=A0 =3D true=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Use EDK2=20 >>>>>>> indentation style for function calls=C2=A0 (**CUSTOM SETTING**) >>>>>>> +indent_paren_after_func_call=C2=A0=C2=A0=C2=A0 =3D true=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 # Whether to indent=20 >>>>>>> the open parenthesis of a function call, if the >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # parenthesis is on=20 >>>>>>> its own line. >>>>>>> + >>>>>>> +# - Align the close parenthesis with the start of the last argumen= t >>>>>>> +indent_paren_close=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # How to indent a=20 >>>>>>> close parenthesis after a newline. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # (0: Body, 1:=20 >>>>>>> Openparenthesis, 2: Brace level) >>>>>>> + >>>>>>> + >>>>>>> +# 5.2.2.5 Always put space after commas or semicolons that=20 >>>>>>> separate items >>>>>>> +sp_after_comma=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force=C2=A0=C2=A0= =C2=A0=C2=A0 # Add or remove=20 >>>>>>> space after ',', i.e. 'a,b' vs. 'a, b'. >>>>>>> +sp_before_comma=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 = # Add or remove=20 >>>>>>> space before ','. >>>>>>> + >>>>>>> +# 5.2.2.6 Always put space before an open parenthesis >>>>>>> +sp_after_sparen=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space after ')' of control statements. >>>>>>> +sp_attribute_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = # Add or remove=20 >>>>>>> space between '__attribute__' and '('. >>>>>>> +sp_before_sparen=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force=C2=A0=C2=A0=C2=A0=C2= =A0 # Add or remove=20 >>>>>>> space before '(' of control statements >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # ('if', 'for',=20 >>>>>>> 'switch', 'while', etc.). >>>>>>> +sp_defined_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force=C2=A0=C2=A0=C2=A0=C2= =A0 # Add or remove=20 >>>>>>> space between 'defined' and '(' in '#if defined >>> (FOO)'. >>>>>>> +sp_func_call_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force=C2=A0=C2=A0=C2=A0=C2=A0 # Add or r= emove=20 >>>>>>> space between function name and '(' on function calls. >>>>>>> +sp_func_call_paren_empty=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D force=C2=A0=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space between function name and '()' on function calls >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # without=20 >>>>>>> parameters. If set to ignore (the default), >>> sp_func_call_paren >>>>> is >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # used. >>>>>>> +sp_func_def_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> space between alias name and '(' of a non-pointer >>>> function >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # type typedef. >>>>>>> +sp_func_proto_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # A= dd or remove=20 >>>>>>> space between function name and '()' on function >>>>> declaration >>>>>>> +sp_sizeof_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force=C2=A0=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> space between 'sizeof' and '('. >>>>>>> +sp_type_func=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space between return type and function name. A minimum >>>> of >>>>> 1 >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # is forced except=20 >>>>>>> for pointer return types. >>>>>>> + >>>>>>> +# Not specified, but also good style to remove spaces inside=20 >>>>>>> parentheses (Optional) >>>>>>> +sp_cparen_oparen=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # A= dd or remove=20 >>>>>>> space between back-to-back parentheses, i.e. ')(' vs. >>> ') >>>>> ('. >>>>>>> +sp_inside_fparen=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # A= dd or remove=20 >>>>>>> space inside function '(' and ')'. >>>>>>> +sp_inside_fparens=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or = remove=20 >>>>>>> space inside empty function '()'. >>>>>>> +sp_inside_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 = # Add or remove=20 >>>>>>> space inside '(' and ')'. >>>>>>> +sp_inside_paren_cast=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> spaces inside cast parentheses. '(int)x' >>>>>>> +sp_inside_square=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # A= dd or remove=20 >>>>>>> space inside a non-empty '[' and ']'. >>>>>>> +sp_paren_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> space between nested parentheses, i.e. '((' vs. ') )'. >>>>>>> +sp_square_fparen=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # A= dd or remove=20 >>>>>>> space between ']' and '(' when part of a function >>> call. >>>>>>> + >>>>>>> +# 5.2.2.7 Put a space before an open brace if it is not on its=20 >>>>>>> own line >>>>>>> +sp_do_brace_open=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force=C2=A0=C2=A0=C2=A0=C2= =A0 # Add or remove=20 >>>>>>> space between 'do' and '{'. >>>>>>> +sp_paren_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force=C2=A0=C2=A0= =C2=A0=C2=A0 # Add or remove=20 >>>>>>> space between ')' and '{'. >>>>>>> +sp_sparen_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force=C2=A0=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> space between ')' and '{' of of control statements. >>>>>>> + >>>>>>> +# 5.2.2.8 Do not put spaces around structure member and pointer=20 >>>>>>> operators >>>>>>> +sp_after_byref=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> space after reference sign '&', if followed by a word. >>>>>>> +sp_before_byref=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space before a reference sign '&'. >>>>>>> +sp_deref=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space after the '*' (dereference) unary operator. This >>>>> does >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # not affect the=20 >>>>>>> spacing after a '*' that is part of a type. >>>>>>> +sp_member=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D remove=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space around the '.' or '->' operators. >>>>>>> + >>>>>>> +# 5.2.2.9 Do not put spaces before open brackets of array=20 >>>>>>> subscripts >>>>>>> +sp_before_square=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # A= dd or remove=20 >>>>>>> space before '[' (except '[]'). >>>>>>> +sp_before_squares=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or = remove=20 >>>>>>> space before '[]'. >>>>>>> +sp_before_vardef_square=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space before '[' for a variable definition. >>>>>>> + >>>>>>> +# 5.2.2.10 Use extra parentheses rather than depending on=20 >>>>>>> in-depth knowledge of the order of precedence of C >>>>>>> +mod_full_paren_if_bool=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D true=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Whether to fully=20 >>>>>>> parenthesize Boolean expressions in 'while' and >>> 'if' >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # statement, as in=20 >>>>>>> 'if (a && b > c)' =3D> 'if (a && (b > c))'. >>>>>>> + >>>>>>> +# 5.2.2.11 Align a continuation line with the part of the line=20 >>>>>>> that it continues. >>>>>>> +use_indent_continue_only_once=C2=A0=C2=A0 =3D true >>>>>>> + >>>>>>> +# Additional '{}' bracing rules (Optional) >>>>>>> +# NOTE - The style guide specifies two different styles for braces= , >>>>>>> +# so these are ignored for now to allow developers some=20 >>>>>>> flexibility. >>>>>>> +nl_after_brace_close=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 =3D true=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Whether to a= dd a=20 >>>>>>> newline after '}'. Does not apply if followed by a >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # necessary ';'. >>>>>>> +nl_brace_else=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0= =C2=A0=C2=A0 # Add or remove=20 >>>>>>> newline between '}' and 'else'. >>>>>>> +nl_brace_while=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> newline between '}' and 'while' of 'do' statement. >>>>>>> +nl_do_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remo= ve=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> newline between 'do' and '{'. >>>>>>> +nl_else_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0= =C2=A0=C2=A0 # Add or remove=20 >>>>>>> newline between 'else' and '{'. >>>>>>> +nl_else_if=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = =3D remove=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> newline between 'else' and 'if'. >>>>>>> +nl_elseif_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 = # Add or remove=20 >>>>>>> newline between 'else if' and '{'. >>>>>>> +nl_enum_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0= =C2=A0=C2=A0 # Add or remove=20 >>>>>>> newline between 'enum' and '{'. >>>>>>> +nl_fcall_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> newline between a function call's ')' and '{', >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # as in=20 >>>>>>> 'list_for_each(item, &list) { }'. >>>>>>> +nl_for_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2= =A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> newline between 'for' and '{'. >>>>>>> +nl_if_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remo= ve=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> newline between 'if' and '{'. >>>>>>> +nl_struct_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 = # Add or remove=20 >>>>>>> newline between 'struct and '{'. >>>>>>> +nl_switch_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 = # Add or remove=20 >>>>>>> newline between 'switch' and '{'. >>>>>>> +nl_union_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> newline between 'union' and '{'. >>>>>>> +nl_while_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> newline between 'while' and '{'. >>>>>>> + >>>>>>> +# Additional whitespace rules (Optional) >>>>>>> +sp_after_ptr_star=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or = remove=20 >>>>>>> space after pointer star '*', if followed by a word. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Useful when paired=20 >>>>>>> with align_var_def_star_style=3D=3D2 >>>>>>> +sp_after_ptr_star_func=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space after a pointer star '*', if followed by a >>>> function >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # prototype or=20 >>>>>>> function definition. >>>>>>> +sp_after_semi=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0= =C2=A0=C2=A0 # Add or remove=20 >>>>>>> space after ';', except when followed by a comment. >>>>>>> +sp_before_case_colon=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space before case ':'. >>>>>>> +sp_before_ptr_star=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = # Add or remove=20 >>>>>>> space before pointer star '*'. >>>>>>> +sp_before_ptr_star_func=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space before a pointer star '*', if followed by a >>>> function >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # prototype or=20 >>>>>>> function definition. >>>>>>> +sp_before_semi=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> space before ';' >>>>>>> +sp_before_semi_for=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or remove= =20 >>>>>>> space before ';' in non-empty 'for' statements. >>>>>>> +sp_before_semi_for_empty=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space before a semicolon of an empty part of a for >>>>> statement >>>>>>> +sp_between_ptr_star=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space between pointer stars '*'. (ie, 'VOID **') >>>>>>> +sp_brace_close_while=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 =3D force=C2=A0=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> space between '}' and 'while'. >>>>>>> + >>>>>>> +sp_after_cast=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove >>>>>>> +sp_after_type=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +sp_balance_nested_parens=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D false >>>>>>> +sp_before_nl_cont=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +sp_before_square_asm_block=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D ignor= e >>>>>>> +sp_before_unnamed_byref=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D add >>>>>>> +sp_brace_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D ignore >>>>>>> +sp_brace_else=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force >>>>>>> +sp_brace_typedef=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +sp_case_label=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force >>>>>>> +sp_cmt_cpp_doxygen=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +sp_cond_colon=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +sp_cond_question=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +sp_cpp_cast_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force >>>>>>> +sp_else_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force >>>>>>> +sp_endif_cmt=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force >>>>>>> +sp_enum_assign=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +sp_inside_braces=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force >>>>>>> +sp_inside_braces_empty=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D force >>>>>>> +sp_inside_braces_enum=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =3D force >>>>>>> +sp_inside_braces_struct=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D force >>>>>>> +sp_pp_concat=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +sp_pp_stringify=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +sp_return_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +sp_special_semi=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force >>>>>>> +sp_while_paren_open=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force >>>>>>> + >>>>>>> +# Additional Indentation Rules >>>>>>> +indent_access_spec=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 1 >>>>>>> +indent_access_spec_body=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D false >>>>>>> +indent_align_assign=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +indent_align_string=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +indent_bool_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +indent_brace_parent=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +indent_braces=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +indent_braces_no_class=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D false >>>>>>> +indent_braces_no_func=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =3D true >>>>>>> +indent_braces_no_struct=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D false >>>>>>> +indent_class=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +indent_class_colon=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +indent_cmt_with_tabs=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 =3D false=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # Whether to=20 >>>>>>> indent comments that are not at a brace level with >>> tabs >>>>> on >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # a tabs= top.=20 >>>>>>> Requires indent_with_tabs=3D2. If false, will use >>> spaces. >>>>>>> +indent_col1_comment=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +indent_col1_multi_string_literal=3D true >>>>>>> +indent_comma_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +indent_else_if=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +indent_extern=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +indent_first_bool_expr=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D true >>>>>>> + >>>>>>> +indent_func_def_param_paren_pos_threshold =3D 0 >>>>>>> +indent_func_param_double=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +indent_func_proto_param=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +indent_ignore_asm_block=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +indent_label=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 1 >>>>>>> +indent_member=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2 >>>>>>> +indent_namespace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +indent_param=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2 >>>>>>> +indent_paren_nl=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +indent_paren_open_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D fals= e >>>>>>> +indent_preserve_sql=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D false >>>>>>> +indent_relative_single_line_comments=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D false >>>>>>> +indent_sing_line_comments=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0 >>>>>>> +indent_single_newlines=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = =3D false >>>>>>> +indent_square_nl=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +indent_switch_case=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =3D 2 >>>>>>> +indent_template_param=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D true >>>>>>> +indent_var_def_blk=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =3D 0 >>>>>>> +indent_var_def_cont=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D false >>>>>>> + >>>>>>> +# Tidy-up rules (Optional) >>>>>>> +mod_move_case_break=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Whethe= r to move a=20 >>>>>>> 'break' that appears after a fully braced 'case' >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # before the close=20 >>>>>>> brace, as in 'case X: { ... } break;' =3D> >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # 'case X: { ...=20 >>>>>>> break; }'. >>>>>>> +mod_pawn_semicolon=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +mod_remove_empty_return=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D false=C2=A0=C2=A0=C2=A0=C2=A0 # Whether to remove=20 >>>>>>> a void 'return;' that appears as the last >>> statement >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # in a function. >>>>>>> +mod_remove_extra_semicolon=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +mod_sort_import=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +mod_sort_include=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +mod_sort_using=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +nl_after_case=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false=C2=A0= =C2=A0=C2=A0=C2=A0 # Whether to add a=20 >>>>>>> newline after a 'case' statement. >>>>>>> +nl_end_of_file=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force=C2=A0=C2=A0= =C2=A0=C2=A0 # Add or remove=20 >>>>>>> newline at the end of the file. >>>>>>> +nl_end_of_file_min=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # The minimum number=20 >>>>>>> of newlines at the end of the file >>>>>>> +nl_max=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =3D 2=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # The= maximum number=20 >>>>>>> of consecutive newlines (3 =3D 2 blank lines). >>>>>>> +nl_start_of_file=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # A= dd or remove=20 >>>>>>> newlines at the start of the file. >>>>>>> + >>>>>>> +# Code alignment rules (Optional) >>>>>>> +align_asm_colon=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +align_assign_span=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 # The span for=20 >>>>>>> aligning on '=3D' in assignments. >>>>>>> +align_assign_thresh=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 4 >>>>>>> +align_edk2_style=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # Whether to apply=20 >>>>>>> edk2-specific alignment formatting >>>>>>> +align_enum_equ_span=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # The span for=20 >>>>>>> aligning on '=3D' in enums. >>>>>>> +align_func_params=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= # Whether to align=20 >>>>>>> variable definitions in prototypes and functions. >>>>>>> +align_func_params_gap=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =3D 2 >>>>>>> +align_func_params_span=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D 2=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # The sp= an for=20 >>>>>>> aligning parameter definitions in function on parameter >>>>> name. >>>>>>> +align_func_params_thresh=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D 0 >>>>>>> +align_func_proto_span=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =3D 0 >>>>>>> +align_keep_tabs=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +align_left_shift=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +align_mix_var_proto=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +align_nl_cont=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +align_oc_decl_colon=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +align_on_operator=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +align_on_tabstop=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +align_pp_define_gap=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2 >>>>>>> +align_pp_define_span=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 =3D 1 >>>>>>> +align_right_cmt_at_col=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Align = trailing=20 >>>>>>> comment at or beyond column N; 'pulls in' comments as >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # a bonus side=20 >>>>>>> effect (0=3Dignore) >>>>>>> +align_right_cmt_gap=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # If a trailing=20 >>>>>>> comment is more than this number of columns away from >>>> the >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # text it follows, >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # it will qualify=20 >>>>>>> for being aligned. This has to be > 0 to do >>> anything. >>>>>>> +align_right_cmt_mix=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false=C2=A0=C2=A0=C2=A0=C2=A0 # If aligning= =20 >>>>>>> comments, mix with comments after '}' and #endif with >>> less >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # than 3 spaces=20 >>>>>>> before the comment >>>>>>> +align_right_cmt_same_level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Whether to only=20 >>>>>>> align trailing comments that are at the same brace >>>>> level. >>>>>>> +align_right_cmt_span=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 =3D 2=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= # The span for=20 >>>>>>> aligning comments that end lines. >>>>>>> +align_same_func_call_params=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +align_single_line_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D true >>>>>>> +align_single_line_func=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D true >>>>>>> +align_struct_init_span=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # The sp= an for=20 >>>>>>> aligning struct initializer values. >>>>>>> +align_typedef_amp_style=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D 1 >>>>>>> +align_typedef_func=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # How to align=20 >>>>>>> typedef'd functions with other typedefs. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # (0: No align, 1:=20 >>>>>>> Align open paranthesis, 2: Align function type >>> name) >>>>>>> +align_typedef_gap=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2 >>>>>>> +align_typedef_span=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # The span for=20 >>>>>>> aligning single-line typedefs. >>>>>>> +align_typedef_star_style=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D 1 >>>>>>> +align_var_def_amp_style=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D 1 >>>>>>> +align_var_def_attribute=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D true >>>>>>> +align_var_def_colon=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Whethe= r to align=20 >>>>>>> the colon in struct bit fields. >>>>>>> +align_var_def_gap=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 # The gap (minimum=20 >>>>>>> spacing for aligned items) for variable >>> definitions. >>>>>>> +align_var_def_inline=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +align_var_def_span=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # The span (lines=20 >>>>>>> needed to align) for aligning variable definitions. >>>>>>> +align_var_def_star_style=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D 1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # How to consider=20 >>>>>>> (or treat) the '*' in the alignment of variable >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # definitions. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # 0: Part of the=20 >>>>>>> type=C2=A0=C2=A0=C2=A0=C2=A0 'void *=C2=A0=C2=A0 foo;' (default) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # 1: Part of the=20 >>>>>>> variable 'void=C2=A0=C2=A0=C2=A0=C2=A0 *foo;' >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # 2:=20 >>>>>>> Dangling=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 'void=C2=A0=C2=A0=C2=A0 *foo;' >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # (Note - should=20 >>>>>>> also set sp_after_ptr_star=3Dremove) >>>>>>> +align_var_struct_gap=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 =3D 4 >>>>>>> +align_var_struct_span=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =3D 8=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # The= span for=20 >>>>>>> aligning struct/union member definitions. >>>>>>> +align_var_struct_thresh=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D 0 >>>>>>> +align_with_tabs=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> + >>>>>>> +# Comment formatting >>>>>>> +cmt_align_doxygen_javadoc_tags=C2=A0 =3D true=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 # Whether to align=20 >>>>>>> doxygen javadoc-style tags ('@param', '@return', >>>> etc.) >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # TODO: Eats '[' in=20 >>>>>>> '[in]' >>>>>>> +cmt_c_group=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D fals= e >>>>>>> +cmt_c_nl_end=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Whether to add a=20 >>>>>>> newline before the closing '*/' of the combined c- >>>>> comment. >>>>>>> +cmt_c_nl_start=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +cmt_cpp_group=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +cmt_cpp_nl_end=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +cmt_cpp_nl_start=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +cmt_cpp_to_c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +cmt_indent_multi=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false=C2=A0=C2=A0=C2=A0=C2= =A0 # Whether to apply=20 >>>>>>> changes to multi-line comments, including >>> cmt_width, >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # keyword=20 >>>>>>> substitution and leading chars. >>>>>>> +cmt_insert_before_preproc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D = false >>>>>>> +cmt_insert_file_header=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D default_file_header.txt >>>>>>> +cmt_insert_func_header=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D default_function_header.txt >>>>>>> +cmt_multi_check_last=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +cmt_multi_first_len_minimum=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2 >>>>>>> +cmt_reflow_mode=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 1=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # How to reflow=20 >>>>>>> comments. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # (0:No reflow, 1:No=20 >>>>>>> touching at all, 2: Full reflow) >>>>>>> +cmt_sp_after_star_cont=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # The nu= mber of=20 >>>>>>> spaces to insert after the star on subsequent comment >>>>> lines. >>>>>>> +cmt_sp_before_star_cont=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # The number o= f=20 >>>>>>> spaces to insert at the start of subsequent comment >>>> lines. >>>>>>> +cmt_star_cont=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false=C2=A0= =C2=A0=C2=A0=C2=A0 # Whether to put a=20 >>>>>>> star on subsequent comment lines. >>>>>>> +cmt_width=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D 120=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Try to wrap=20 >>>>>>> comments at N columns. >>>>>>> +sp_cmt_cpp_start=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 # Add or remove=20 >>>>>>> space after the opening of a C++ comment, as in >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # '// A'. =20 >>>>>>> NOTE: Breaks indentation within comments. >>>>>>> + >>>>>>> +# Function definitions / declarations >>>>>>> +indent_func_call_param=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D false=C2=A0=C2=A0=C2=A0=C2=A0 # Whether to indent=20 >>>>>>> continued function call parameters one indent >>> level, >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # rather than=20 >>>>>>> aligning parameters under the open parenthesis. >>>>>>> +indent_func_class_param=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D false=C2=A0=C2=A0=C2=A0=C2=A0 # Whether to indent=20 >>>>>>> continued function call declaration one indent >>>> level, >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # rather than=20 >>>>>>> aligning parameters under the open parenthesis. >>>>>>> +indent_func_ctor_var_param=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false= =C2=A0=C2=A0=C2=A0=C2=A0 # Whether to indent=20 >>>>>>> continued class variable constructors one indent >>>>> level, >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # rather than=20 >>>>>>> aligning parameters under the open parenthesis. >>>>>>> +indent_func_def_param=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =3D true=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Whether to indent= =20 >>>>>>> continued function definition parameters one >>> indent >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # level, rather than=20 >>>>>>> aligning parameters under the open parenthesis. >>>>>>> +nl_fdef_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 # Add or remove=20 >>>>>>> newline between function signature and '{'. >>>>>>> +nl_func_call_end_multi_line=C2=A0=C2=A0=C2=A0=C2=A0 =3D true=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 # Whether to add a=20 >>>>>>> newline before ')' in a function call if '(' and >>> ')' >>>>> are >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # in different lines. >>>>>>> +nl_func_call_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or remove= =20 >>>>>>> newline between a function name and the opening '(' in >>>> the >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # call. >>>>>>> +nl_func_call_start_multi_line=C2=A0=C2=A0 =3D true=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 # Whether to add a=20 >>>>>>> newline after '(' in a function call if '(' and ')' >>>> are >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # in different lines. >>>>>>> +nl_func_decl_args=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force=C2=A0=C2=A0=C2=A0=C2=A0 # Ad= d or remove=20 >>>>>>> newline after each ',' in a function declaration. >>>>>>> +nl_func_decl_empty=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = # Add or remove=20 >>>>>>> newline between '()' in a function declaration. >>>>>>> +nl_func_def_args=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force=C2=A0=C2=A0=C2=A0=C2= =A0 # Add or remove=20 >>>>>>> newline after each ',' in a function definition. >>>>>>> +nl_func_def_empty=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> newline between '()' in a function definition. >>>>>>> +nl_func_def_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0=C2=A0=C2=A0 # Add or = remove=20 >>>>>>> newline between a function name and the opening '(' >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # in the definition. >>>>>>> +nl_func_paren=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove=C2=A0= =C2=A0=C2=A0 # Add or remove=20 >>>>>>> newline between a function name and the opening '(' in >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # the declaration. >>>>>>> +nl_func_type_name=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> newline between return type and function name in a >>>>> function >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # definition. >>>>>>> +sp_fparen_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force=C2=A0=C2=A0=C2=A0= =C2=A0 # Add or remove=20 >>>>>>> space between ')' and '{' of function. >>>>>>> +use_indent_func_call_param=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #=20 >>>>>>> indent_func_call_param will be used >>>>>>> + >>>>>>> +# Additional Newline Rules >>>>>>> +nl_after_brace_open=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true=C2=A0=C2=A0=C2=A0=C2=A0 #=20 >>>>>>> Whether to add a newline after '{'. This also adds a >>>> newline >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # before=20 >>>>>>> the matching '}'. >>>>>>> +nl_after_brace_open_cmt=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 =3D true=C2=A0=C2=A0=C2=A0=C2=A0 #=20 >>>>>>> Whether to add a newline between the open brace and a >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #=20 >>>>>>> trailing single-line comment. >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #=20 >>>>>>> Requires nl_after_brace_open =3D true. >>>>>>> +nl_after_do=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D a= dd=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Add or=20 >>>>>>> remove blank line after 'do/while' statement. >>>>>>> +nl_after_for=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 # Add or=20 >>>>>>> remove blank line after 'for' statement. >>>>>>> +nl_after_func_body=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 # The=20 >>>>>>> number of newlines after '}' of a multi-line >>> function >>>>> body >>>>>>> +nl_after_func_body_one_liner=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2 >>>>>>> +nl_after_func_proto=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2 >>>>>>> +nl_after_func_proto_group=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D 2 >>>>>>> +nl_after_if=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D a= dd >>>>>>> +nl_after_multiline_comment=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D f= alse >>>>>>> +nl_after_return=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +nl_after_struct=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2 >>>>>>> +nl_after_switch=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +nl_after_vbrace_close=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +nl_after_vbrace_open=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +nl_after_vbrace_open_empty=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D t= rue >>>>>>> +nl_after_while=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +nl_assign_leave_one_liners=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D t= rue >>>>>>> +nl_before_block_comment=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 =3D 2 >>>>>>> +nl_before_case=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +nl_before_do=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D ignore >>>>>>> +nl_before_for=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D ignore >>>>>>> +nl_before_if=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D ignore >>>>>>> +nl_before_switch=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D ignore >>>>>>> +nl_before_while=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D ignore >>>>>>> +nl_before_whole_file_ifdef=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2 >>>>>>> +nl_brace_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D force >>>>>>> +nl_brace_struct_var=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove >>>>>>> +nl_case_colon_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +nl_class_leave_one_liners=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D false >>>>>>> +nl_collapse_empty_body=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =3D false >>>>>>> +nl_comment_func_def=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 1 >>>>>>> +nl_create_for_one_liner=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 =3D false >>>>>>> +nl_create_if_one_liner=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =3D false >>>>>>> +nl_create_while_one_liner=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =3D false >>>>>>> +nl_define_macro=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +nl_ds_struct_enum_close_brace=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +nl_ds_struct_enum_cmt=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +nl_enum_leave_one_liners=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 =3D false >>>>>>> +nl_func_decl_end=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +nl_func_decl_start=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +nl_func_def_end=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +nl_func_def_start=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +nl_func_leave_one_liners=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 =3D false >>>>>>> +nl_func_proto_type_name=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 =3D add >>>>>>> +nl_func_var_def_blk=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 1 >>>>>>> +nl_getset_leave_one_liners=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D f= alse >>>>>>> +nl_if_leave_one_liners=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =3D false >>>>>>> +nl_multi_line_define=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +nl_squeeze_ifdef=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +nl_var_def_blk_end=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0 >>>>>>> +nl_var_def_blk_start=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 =3D 0 >>>>>>> + >>>>>>> +# Preprocessor Rules >>>>>>> +pp_define_at_level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +pp_if_indent_code=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +pp_indent_func_def=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D false >>>>>>> +pp_indent_extern=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D fal= se >>>>>>> +pp_ignore_define_body=C2=A0=C2=A0 =3D true=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # Workar= ound: Turn=20 >>>>>>> off processing for #define body >>>>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # (current rules=20 >>>>>>> do not work for some defines) >>>>>>> +pp_indent=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D add >>>>>>> +pp_indent_at_level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D true >>>>>>> +pp_indent_count=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = =3D 2 >>>>>>> +pp_indent_if=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 =3D 2 >>>>>>> +pp_indent_region=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 2 >>>>>>> +pp_region_indent_code=C2=A0=C2=A0 =3D false >>>>>>> +pp_space=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D remove >>>>>>> + >>>>>>> +# >>>>>>> +# The tokens below are assigned specific types so they are=20 >>>>>>> always recognized properly. >>>>>>> +# >>>>>>> + >>>>>>> +# Explicitly define EDK II qualifiers >>>>>>> +set QUALIFIER CONST >>>>>>> +set QUALIFIER EFIAPI >>>>>>> +set QUALIFIER IN >>>>>>> +set QUALIFIER OPTIONAL >>>>>>> +set QUALIFIER OUT >>>>>>> + >>>>>>> +# Explicitly define EDK II types >>>>>>> +set TYPE EFI_STATUS >>>>>>> +set TYPE VOID >>>>>>> diff --git a/.pytool/Plugin/UncrustifyCheck/uncrustify_ext_dep.yaml >>>>>>> b/.pytool/Plugin/UncrustifyCheck/uncrustify_ext_dep.yaml >>>>>>> new file mode 100644 >>>>>>> index 000000000000..d8c22403b4b1 >>>>>>> --- /dev/null >>>>>>> +++ b/.pytool/Plugin/UncrustifyCheck/uncrustify_ext_dep.yaml >>>>>>> @@ -0,0 +1,16 @@ >>>>>>> +## @file >>>>>>> +# Downloads the Uncrustify application from a Project Mu NuGet=20 >>>>>>> package. >>>>>>> +# >>>>>>> +# Copyright (c) Microsoft Corporation. >>>>>>> +# SPDX-License-Identifier: BSD-2-Clause-Patent >>>>>>> +## >>>>>>> +{ >>>>>>> +=C2=A0 "id": "uncrustify-ci-1", >>>>>>> +=C2=A0 "scope": "cibuild", >>>>>>> +=C2=A0 "type": "nuget", >>>>>>> +=C2=A0 "name": "mu-uncrustify-release", >>>>>>> +=C2=A0 "source":=20 >>>>>>> "https://pkgs.dev.azure.com/projectmu/Uncrustify/_packaging/mu_uncr= ustify/nuget/v3/index.json",=20 >>>>>>> >>>>>>> +=C2=A0 "version": "73.0.3", >>>>>>> +=C2=A0 "flags": ["set_shell_var", "host_specific"], >>>>>>> +=C2=A0 "var_name": "UNCRUSTIFY_CI_PATH" >>>>>>> +} >>>>>>> diff --git a/.pytool/Plugin/UncrustifyCheck/uncrustify_plug_in.yaml >>>>>>> b/.pytool/Plugin/UncrustifyCheck/uncrustify_plug_in.yaml >>>>>>> new file mode 100644 >>>>>>> index 000000000000..06c76af02759 >>>>>>> --- /dev/null >>>>>>> +++ b/.pytool/Plugin/UncrustifyCheck/uncrustify_plug_in.yaml >>>>>>> @@ -0,0 +1,11 @@ >>>>>>> +## @file >>>>>>> +# CiBuildPlugin used to check coding standard compliance of EDK=20 >>>>>>> II style C source code >>>>>>> +# >>>>>>> +# Copyright (c) Microsoft Corporation. >>>>>>> +# SPDX-License-Identifier: BSD-2-Clause-Patent >>>>>>> +## >>>>>>> +{ >>>>>>> +=C2=A0 "scope": "cibuild", >>>>>>> +=C2=A0 "name": "Uncrustify Coding Standard Test", >>>>>>> +=C2=A0 "module": "UncrustifyCheck" >>>>>>> +} >>>>>>> diff --git a/.pytool/Readme.md b/.pytool/Readme.md >>>>>>> index f6505507966a..e0d07f317049 100644 >>>>>>> --- a/.pytool/Readme.md >>>>>>> +++ b/.pytool/Readme.md >>>>>>> @@ -264,6 +264,10 @@ BSD-2-Clause-Patent. >>>>>>> =C2=A0=C2=A0 Run the Ecc tool on the package. The Ecc tool is avail= able in=20 >>>>>>> the BaseTools >>>>>>> =C2=A0=C2=A0 package. It checks that the code complies to the EDKII= coding=20 >>>>>>> standard. >>>>>>> >>>>>>> +### Coding Standard Compliance - UncrustifyCheck >>>>>>> + >>>>>>> +Runs the Uncrustify application to check for coding standard=20 >>>>>>> compliance issues. >>>>>>> + >>>>>>> =C2=A0=C2=A0 ## PyTool Scopes >>>>>>> >>>>>>> =C2=A0=C2=A0 Scopes are how the PyTool ext_dep, path_env, and plugi= ns are=20 >>>>>>> activated.=C2=A0 Meaning >>>>>>> --=20 >>>>>>> 2.28.0.windows.1 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> >> >> >> >> >> >> >=20 >=20 >=20 >=20