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 <hesheng.chen@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15886 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user