Hi Michael, recently I encountered an uncrustify failure on github.
The reason was that my local uncrustify was *more recent* (73.0.8) than the one we use in edk2 CI (which is 73.0.3, per the edk2 file ".pytool/Plugin/UncrustifyCheck/uncrustify_ext_dep.yaml"). Updating the version number in the YAML file (i.e., advancing edk2 to version 73.0.8) seems easy enough, but: - Do you think 73.0.8 is mature enough for adoption in edk2? This upstream uncrustify release was tagged in April (and I can't see any more recent commits), so I assume it should be stable. - Would the version update require a whole-tree re-uncrustification? The reason I'm not just ignoring this topic is that 73.0.8 actually produces *better output* than 73.0.3, at least in the one instance I encountered. Compare: > diff --git > a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c > b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c > index 434cdca84b23..3a6f75988220 100644 > --- a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c > +++ b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c > @@ -43,12 +43,12 @@ STATIC EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL > STATIC CONST EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR mMmio64Configuration = { > ACPI_ADDRESS_SPACE_DESCRIPTOR, // Desc > (UINT16)( // Len > - sizeof > (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - > - OFFSET_OF ( > - > EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR, > - ResType > - ) > - ), > + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - > + OFFSET_OF ( > + EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR, > + ResType > + ) > + ), > ACPI_ADDRESS_SPACE_TYPE_MEM, // ResType > 0, // GenFlag > 0, // SpecificFlag > @@ -77,12 +77,12 @@ STATIC CONST EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR > mMmio64Configuration = { > STATIC CONST EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR mOptionRomConfiguration = { > ACPI_ADDRESS_SPACE_DESCRIPTOR, // Desc > (UINT16)( // Len > - sizeof > (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - > - OFFSET_OF ( > - > EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR, > - ResType > - ) > - ), > + sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - > + OFFSET_OF ( > + EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR, > + ResType > + ) > + ), > ACPI_ADDRESS_SPACE_TYPE_MEM, // ResType > 0, // GenFlag > 0, // Disable option roms > SpecificFlag Note that 73.0.3 indents the subexpression to the "//" comment on the previous line, while 73.0.8 ignores the comment -- which I think is justified here. I believe this improvement may come from uncrustify commit 239c4fad745b ("Prevent endless indentation scenario in struct assignment", 2022-07-29). I think it's worth having in edk2. CC: stewards, Pedro (commit 6ded9f50c3aa), Marcin (traditionally a big fan of uncrustify :)) Thanks Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111147): https://edk2.groups.io/g/devel/message/111147 Mute This Topic: https://groups.io/mt/102559740/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-