From b3d07ff8d21ecab5a8060815e9abe73c904e3ed9 Mon Sep 17 00:00:00 2001 From: Hess Chen Date: Mon, 25 Aug 2014 01:16:34 +0000 Subject: This patch is going to: 1. Add a checkpoint to check if an UNI file is a valid UTF-16 file 2. Add a checkpoint to check if a GUID/PPI/PROTOCOL/PCD is in a valid format. 3. Some other minor changes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen Reviewed-by: Yingke Liu git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15886 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/Python/Ecc/MetaDataParser.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'BaseTools/Source/Python/Ecc/MetaDataParser.py') 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() -- cgit v1.2.3