mirror_edk2/BaseTools/Source/Python/Ecc
Pierre Gondois 6ffbb3581a BaseTools: Align include guards policy
The EDK II C Coding Standards Specification states that:
"Names starting with one or two underscores, such as
_MACRO_GUARD_FILE_NAME_H_, must not be used. They are
reserved for compiler implementation." [1]

The Ecc tool currently checks that the include guard end with
a trailing underscore. Thus, the check and the error message
should both be modified.

The new check forces having one sole trailing underscore
character, as the example in the specification shows:
"FILE_NAME_H_" [1]
This would allow to have more consistency.

[1] Section 5.3.5 "All include file contents must be protected
by a #include guard":
https://edk2-docs.gitbook.io/
edk-ii-c-coding-standards-specification/5_source_files/53_include_files

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Sami Mujawar <Sami.Mujawar@arm.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2021-02-26 05:40:32 +00:00
..
CParser3 BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
CParser4 BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
MetaFileWorkspace BaseTools:fix Ecc tool issue for check StructPcd 2020-02-12 09:26:22 +00:00
Xml BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
__init__.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
C.g BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
c.py BaseTools/Ecc: Allow init of function static variables 2020-12-22 01:26:10 +00:00
Check.py BaseTools: Align include guards policy 2021-02-26 05:40:32 +00:00
CodeFragment.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
CodeFragmentCollector.py BaseTools:ECC report errors on account of analyze special characters 2019-05-08 09:41:42 +08:00
config.ini BaseTools:ECC report errors on account of analyze special characters 2019-05-08 09:41:42 +08:00
Configuration.py BaseTools:ECC need to handle lower case 'static' 2019-09-09 11:14:42 +08:00
Database.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
EccGlobalData.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
EccMain.py BaseTools/Ecc: Replace deprecated function time.clock() 2020-05-13 05:52:03 +00:00
EccToolError.py BaseTools: Align include guards policy 2021-02-26 05:40:32 +00:00
Exception.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
exception.xml BaseTools: Ecc/exception: Added _ModuleEntryPoint into exception list 2021-02-01 10:01:02 -08:00
FileProfile.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
MetaDataParser.py BaseTools/Ecc: Fix ECC check MetaFile Copyright information issue 2020-10-27 06:50:06 +00:00
ParserWarning.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00