X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FEcc%2Fc.py;fp=BaseTools%2FSource%2FPython%2FEcc%2Fc.py;h=12dbf664ba9bda6590a05fbf6063d7e05adad93a;hp=e2a5cc8487fabeaaa65aa15e52f82cf4e962a39a;hb=f7496d717357b9af78414d19679b073403812340;hpb=39456d00f36e04b7e7efb208f350f4e83b6c3531 diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py index e2a5cc8487..12dbf664ba 100644 --- a/BaseTools/Source/Python/Ecc/c.py +++ b/BaseTools/Source/Python/Ecc/c.py @@ -2349,13 +2349,13 @@ def CheckFileHeaderDoxygenComments(FullFileName): if (len(CommentStrListTemp) <= 1): # For Mac CommentStrListTemp = CommentStr.split('\r') - # Skip the content before the file header + # Skip the content before the file header for CommentLine in CommentStrListTemp: if CommentLine.strip().startswith('/** @file'): FileStartFlag = True if FileStartFlag == True: CommentStrList.append(CommentLine) - + ID = Result[1] Index = 0 if CommentStrList and CommentStrList[0].strip().startswith('/** @file'): @@ -2378,7 +2378,7 @@ def CheckFileHeaderDoxygenComments(FullFileName): if EccGlobalData.gConfig.HeaderCheckCFileCommentStartSpacesNum == '1' or EccGlobalData.gConfig.HeaderCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1': if CommentLine.startswith('/** @file') == False and CommentLine.startswith('**/') == False and CommentLine.strip() and CommentLine.startswith(' ') == False: PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'File header comment content should start with two spaces at each line', FileTable, ID) - + CommentLine = CommentLine.strip() if CommentLine.startswith('Copyright'): NoCopyrightFlag = False @@ -2403,9 +2403,9 @@ def CheckFileHeaderDoxygenComments(FullFileName): # Check whether C File header Comment's each reference at list should begin with a bullet character. if EccGlobalData.gConfig.HeaderCheckCFileCommentReferenceFormat == '1' or EccGlobalData.gConfig.HeaderCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1': if RefListFlag == True: - if RefLine.strip() and RefLine.strip().startswith('**/') == False and RefLine.startswith(' -') == False: - PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'Each reference on a separate line should begin with a bullet character ""-"" ', FileTable, ID) - + if RefLine.strip() and RefLine.strip().startswith('**/') == False and RefLine.startswith(' -') == False: + PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'Each reference on a separate line should begin with a bullet character ""-"" ', FileTable, ID) + if NoHeaderCommentStartFlag: PrintErrorMsg(ERROR_DOXYGEN_CHECK_FILE_HEADER, 'File header comment should begin with ""/** @file""', FileTable, ID) return