[edk2-devel] ECC tool incorrectly reports that include guards must have prefix and postfix underscores

Rebecca Cran rebecca at nuviainc.com
Mon Nov 30 15:36:12 UTC 2020


I came across what appears to be a bug in the ECC tool. I was running my 
bhyve changes through a personal EDK2 Github build, and ECC failed with 
the ERROR_NAMING_CONVENTION_CHECK_IFNDEF_STATEMENT:


./Source/Python/Ecc/EccToolError.py:164: 
ERROR_NAMING_CONVENTION_CHECK_IFNDEF_STATEMENT : "The #ifndef at the 
start of an include file should use both prefix and postfix underscore 
characters, '_'"


It appears the tool really only checks that there's at least one 
underscore, so it seems it does _allow_ the style documented in the C 
coding standard 
(https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/5_source_files/53_include_files#5-3-5-all-include-file-contents-must-be-protected-by-a-include-guard), 
which has a postfix underscore but which explicitly disallows prefix 
underscore(s).


I've created https://bugzilla.tianocore.org/show_bug.cgi?id=3094 .


-- 
Rebecca Cran



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68080): https://edk2.groups.io/g/devel/message/68080
Mute This Topic: https://groups.io/mt/78610442/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list