X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FEcc%2FMetaDataParser.py;h=d80a5cff5d680fb0dae3dc89fb2ca2d66163c37e;hb=00261e1dc62ec078391f0239683ba7a709d3122d;hp=98b16a0e5c4446ac694aa314d13b39558fb7eb62;hpb=1be2ed90a20618d71ddf34b8a07d038da0b36854;p=mirror_edk2.git diff --git a/BaseTools/Source/Python/Ecc/MetaDataParser.py b/BaseTools/Source/Python/Ecc/MetaDataParser.py index 98b16a0e5c..d80a5cff5d 100644 --- a/BaseTools/Source/Python/Ecc/MetaDataParser.py +++ b/BaseTools/Source/Python/Ecc/MetaDataParser.py @@ -184,19 +184,26 @@ def ParseHeaderCommentSection(CommentList, FileName = None): continue License += Comment + EndOfLine - if not Copyright: + if not Copyright.strip(): SqlStatement = """ select ID from File where FullPath like '%s'""" % FileName ResultSet = EccGlobalData.gDb.TblFile.Exec(SqlStatement) for Result in ResultSet: Msg = 'Header comment section must have copyright information' EccGlobalData.gDb.TblReport.Insert(ERROR_DOXYGEN_CHECK_FILE_HEADER, Msg, "File", Result[0]) - if not License: + if not License.strip(): SqlStatement = """ select ID from File where FullPath like '%s'""" % FileName ResultSet = EccGlobalData.gDb.TblFile.Exec(SqlStatement) for Result in ResultSet: Msg = 'Header comment section must have license information' EccGlobalData.gDb.TblReport.Insert(ERROR_DOXYGEN_CHECK_FILE_HEADER, Msg, "File", Result[0]) + + if not Abstract.strip() or Abstract.find('Component description file') > -1: + SqlStatement = """ select ID from File where FullPath like '%s'""" % FileName + ResultSet = EccGlobalData.gDb.TblFile.Exec(SqlStatement) + for Result in ResultSet: + Msg = 'Header comment section must have Abstract information.' + EccGlobalData.gDb.TblReport.Insert(ERROR_DOXYGEN_CHECK_FILE_HEADER, Msg, "File", Result[0]) return Abstract.strip(), Description.strip(), Copyright.strip(), License.strip()