## @file\r
# This file is used to define common parser functions for meta-data\r
#\r
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
#\r
\r
-import os\r
+import Common.LongFilePathOs as os\r
from CommonDataClass.DataClass import *\r
from EccToolError import *\r
+from Common.MultipleWorkspace import MultipleWorkspace as mws\r
import EccGlobalData\r
import re\r
## Get the inlcude path list for a source file\r
% (MODEL_META_DATA_PACKAGE, MODEL_EFI_SOURCE_FILE, '\\', Filepath)\r
RecordSet = Db.TblFile.Exec(SqlCommand)\r
for Record in RecordSet:\r
- DecFullPath = os.path.normpath(os.path.join(WorkSpace, Record[0]))\r
- InfFullPath = os.path.normpath(os.path.join(WorkSpace, Record[1]))\r
+ DecFullPath = os.path.normpath(mws.join(WorkSpace, Record[0]))\r
+ InfFullPath = os.path.normpath(mws.join(WorkSpace, Record[1]))\r
(DecPath, DecName) = os.path.split(DecFullPath)\r
(InfPath, InfName) = os.path.split(InfFullPath)\r
SqlCommand = """select Value1 from Dec where BelongsToFile =\r
continue\r
License += Comment + EndOfLine\r
\r
- if not Copyright:\r
+ if not Copyright.strip():\r
SqlStatement = """ select ID from File where FullPath like '%s'""" % FileName\r
ResultSet = EccGlobalData.gDb.TblFile.Exec(SqlStatement)\r
for Result in ResultSet:\r
Msg = 'Header comment section must have copyright information'\r
EccGlobalData.gDb.TblReport.Insert(ERROR_DOXYGEN_CHECK_FILE_HEADER, Msg, "File", Result[0])\r
\r
- if not License:\r
+ if not License.strip():\r
SqlStatement = """ select ID from File where FullPath like '%s'""" % FileName\r
ResultSet = EccGlobalData.gDb.TblFile.Exec(SqlStatement)\r
for Result in ResultSet:\r
Msg = 'Header comment section must have license information'\r
EccGlobalData.gDb.TblReport.Insert(ERROR_DOXYGEN_CHECK_FILE_HEADER, Msg, "File", Result[0])\r
+ \r
+ if not Abstract.strip() or Abstract.find('Component description file') > -1:\r
+ SqlStatement = """ select ID from File where FullPath like '%s'""" % FileName\r
+ ResultSet = EccGlobalData.gDb.TblFile.Exec(SqlStatement)\r
+ for Result in ResultSet:\r
+ Msg = 'Header comment section must have Abstract information.'\r
+ EccGlobalData.gDb.TblReport.Insert(ERROR_DOXYGEN_CHECK_FILE_HEADER, Msg, "File", Result[0])\r
\r
return Abstract.strip(), Description.strip(), Copyright.strip(), License.strip()\r
\r