]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Ecc/c.py
BaseTools/Ecc: Fix a bug when checking copyright format
[mirror_edk2.git] / BaseTools / Source / Python / Ecc / c.py
index 1e89f117285ca506e510354f81e9f59418699f26..a7eefa1e07a446503b6af14f203095ec74934cf8 100644 (file)
@@ -2364,7 +2364,10 @@ def CheckFileHeaderDoxygenComments(FullFileName):
             if CommentLine.startswith('Copyright'):\r
                 NoCopyrightFlag = False\r
                 if CommentLine.find('All rights reserved') == -1:\r
-                    PrintErrorMsg(ERROR_HEADER_CHECK_FILE, '""All rights reserved"" announcement should be following the ""Copyright"" at the same line', FileTable, ID)\r
+                    for Copyright in EccGlobalData.gConfig.Copyright:\r
+                        if CommentLine.find(Copyright) > -1:\r
+                            PrintErrorMsg(ERROR_HEADER_CHECK_FILE, '""All rights reserved"" announcement should be following the ""Copyright"" at the same line', FileTable, ID)\r
+                            break\r
                 if CommentLine.endswith('<BR>') == -1:\r
                     PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'The ""<BR>"" at the end of the Copyright line is required', FileTable, ID)\r
                 if NextLineIndex < len(CommentStrList) and CommentStrList[NextLineIndex].strip().startswith('Copyright') == False and CommentStrList[NextLineIndex].strip():\r