Reporting Issues
Bug 3737 - Apply uncrustify changes to all package C and H files
Summary: Apply uncrustify changes to all package C and H files
Status: RESOLVED FIXED
Alias: None
Product: Tianocore Feature Requests
Classification: Unclassified
Component: Code (show other bugs)
Version: Current
Hardware: All All
: Lowest normal
Assignee: Michael Kinney
URL:
Keywords:
: 3207 (view as bug list)
Depends on: 3739
Blocks:
  Show dependency tree
 
Reported: 2021-11-16 12:42 UTC by Michael Kinney
Modified: 2023-01-03 04:25 UTC (History)
6 users (show)

See Also:
EDK II Code First industry standard specifications: ---
Branch URL:
Release(s) the issue is observed: EDK II Master
The OS the target platform is running: ---
Package: ArmPkg, ArmPlatformPkg, ArmVirtPkg, CryptoPkg, DynamicTablesPkg, EmbeddedPkg, EmulatorPkg, FatPkg, FmpDevicePkg, IntelFsp2Pkg, IntelFsp2WrapperPkg, MdeModulePkg, MdePkg, NetworkPkg, OvmfPkg, PcAtChipsetPkg, RedfishPkg, SecurityPkg, ShellPkg, SignedCapsulePkg, SourceLevelDebugPkg, StandaloneMmPkg, UefiCpuPkg, UefiPayloadPkg, UnitTestFrameworkPkg
Release(s) the issues must be fixed: EDK II Master
Tianocore documents:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kinney 2021-11-16 12:42:55 UTC
Add uncrustify configuration file to edk2 and apply uncrustify
changes to all package C and H files.

Uncrustify changes must not be applied to BaseTools directory or
to an submodules.

Documentation from development of uncrustify for TianoCore:

https://dev.azure.com/projectmu/Uncrustify/_wiki/wikis/Uncrustify.wiki/1/Project-Mu-(EDK-II)-Fork-Readme

Git repo with version of uncrustify with small updates to support some
edk2 specific C coding style rules

https://dev.azure.com/projectmu/_git/Uncrustify
Comment 1 Michael Kinney 2021-11-16 12:49:16 UTC
Assign to owner
Comment 2 gaoliming 2021-11-26 09:49:22 UTC
This should be new feature.
Comment 3 Michael Kinney 2022-01-14 20:09:27 UTC
This change was included in the uncrustify patch series
that was merged in the following PR:

    https://github.com/tianocore/edk2/pull/2242

This patch series is composed of 72 commits.  Push range: 
    https://github.com/tianocore/edk2/pull/2242/commits/8c2820c0502820d957b200f9d7ae3e15ecc6368e
    ...
    https://github.com/tianocore/edk2/pull/2242/commits/e0f4416242c7c6b7d06d8939f45da837df06a116

============================================================
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3767
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3739

* Update all use of EFI_D_* defines in DEBUG() macros to DEBUG_* defines.
* Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params.
* Change complex DEBUG_CODE() to DEBUG_CODE_BEGIN/END()
* Apply uncrustify changes to all package .c/.h files(BaseTools excluded)

devel@edk2.groups.io discussions:
* https://edk2.groups.io/g/devel/topic/uncrustify_conversion/87414953?p=,,,20,0,0,0::recentpostdate/sticky,,,20,2,0,87414953,previd=1638890440315310506,nextid=1638842194018157807&previd=1638890440315310506&nextid=1638842194018157807
* https://edk2.groups.io/g/devel/message/84132
* https://edk2.groups.io/g/devel/message/84112
* https://edk2.groups.io/g/devel/message/84074

Compare Build Results across all commits in this PR
* Detects any binary differences across entire patch series (obj, lib, dll, efi, ffs, fv, fd)
* repo: https://github.com/mdkinney/edk2
* ref1: 8c2820c0502820d957b200f9d7ae3e15ecc6368e
* ref2: e0f4416242c7c6b7d06d8939f45da837df06a116
* 30 VS2019 build comparisons. Pass 100%.  No binary differences detected.
* 40 GCC5 build comparisons. Pass 100%.    No binary differences detected.
* https://github.com/mdkinney/edk2/actions/runs/1550132292

Cc: Andrew Fish afish@apple.com
Cc: Leif Lindholm leif@nuviainc.com
Cc: Michael D Kinney michael.d.kinney@intel.com
Cc: Michael Kubacki michael.kubacki@microsoft.com
Comment 4 Laszlo Ersek 2023-01-03 04:25:09 UTC
*** Bug 3207 has been marked as a duplicate of this bug. ***