diff options
author | Hess Chen <hesheng.chen@intel.com> | 2015-07-02 06:05:26 +0000 |
---|---|---|
committer | hchen30 <hchen30@Edk2> | 2015-07-02 06:05:26 +0000 |
commit | d77cc2063de7be8a1b28ef2efb5770df4578975a (patch) | |
tree | f10e734d01b1c7fdfd4486bf86934a5367ed7ba8 /BaseTools/Source/Python/Ecc/c.py | |
parent | fa3a21569b05693f414ed39e3acd74e3e58b299c (diff) | |
download | edk2-d77cc2063de7be8a1b28ef2efb5770df4578975a.tar.gz edk2-d77cc2063de7be8a1b28ef2efb5770df4578975a.tar.bz2 edk2-d77cc2063de7be8a1b28ef2efb5770df4578975a.zip |
BaseTools/Ecc: Fix a bug when checking copyright format
Fix a bug to only checking the copyright listed in config.ini file.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: YangX Li <yangx.li@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17801 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/Ecc/c.py')
-rw-r--r-- | BaseTools/Source/Python/Ecc/c.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py index 1e89f11728..a7eefa1e07 100644 --- a/BaseTools/Source/Python/Ecc/c.py +++ b/BaseTools/Source/Python/Ecc/c.py @@ -2364,7 +2364,10 @@ def CheckFileHeaderDoxygenComments(FullFileName): if CommentLine.startswith('Copyright'):
NoCopyrightFlag = False
if CommentLine.find('All rights reserved') == -1:
- PrintErrorMsg(ERROR_HEADER_CHECK_FILE, '""All rights reserved"" announcement should be following the ""Copyright"" at the same line', FileTable, ID)
+ for Copyright in EccGlobalData.gConfig.Copyright:
+ if CommentLine.find(Copyright) > -1:
+ PrintErrorMsg(ERROR_HEADER_CHECK_FILE, '""All rights reserved"" announcement should be following the ""Copyright"" at the same line', FileTable, ID)
+ break
if CommentLine.endswith('<BR>') == -1:
PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'The ""<BR>"" at the end of the Copyright line is required', FileTable, ID)
if NextLineIndex < len(CommentStrList) and CommentStrList[NextLineIndex].strip().startswith('Copyright') == False and CommentStrList[NextLineIndex].strip():
|