diff options
author | Hess Chen <hesheng.chen@intel.com> | 2014-08-25 01:16:34 +0000 |
---|---|---|
committer | hchen30 <hchen30@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-08-25 01:16:34 +0000 |
commit | b3d07ff8d21ecab5a8060815e9abe73c904e3ed9 (patch) | |
tree | ecc756e5c8173a9d9aa82beb43fc526e19608066 /BaseTools/Source/Python/Ecc/MetaDataParser.py | |
parent | f056e4c18047e9a0157a915175d07afbd8b8c581 (diff) | |
download | edk2-b3d07ff8d21ecab5a8060815e9abe73c904e3ed9.tar.gz edk2-b3d07ff8d21ecab5a8060815e9abe73c904e3ed9.tar.bz2 edk2-b3d07ff8d21ecab5a8060815e9abe73c904e3ed9.zip |
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
Diffstat (limited to 'BaseTools/Source/Python/Ecc/MetaDataParser.py')
-rw-r--r-- | BaseTools/Source/Python/Ecc/MetaDataParser.py | 11 |
1 files changed, 9 insertions, 2 deletions
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()
|