Field = Field.split('=')[0].strip()\r
TokenList = Field.split()\r
# Remove pointers before variable\r
- if not Pattern.match(TokenList[-1].lstrip('*')):\r
- ErrMsgList.append(TokenList[-1].lstrip('*'))\r
+ Token = TokenList[-1]\r
+ if Token in ['OPTIONAL']:\r
+ Token = TokenList[-2]\r
+ if not Pattern.match(Token.lstrip('*')):\r
+ ErrMsgList.append(Token.lstrip('*'))\r
\r
return ErrMsgList\r
\r
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