Add a checkpoint for UNI file which is missing '"' at the end of a line.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
## @file\r
# Collect all defined strings in multiple uni files.\r
#\r
## @file\r
# Collect all defined strings in multiple uni files.\r
#\r
-# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials are licensed and made available \r
# under the terms and conditions of the BSD License which accompanies this \r
#\r
# This program and the accompanying materials are licensed and made available \r
# under the terms and conditions of the BSD License which accompanies this \r
Message="Cannot find include file", \r
ExtraData=str(IncList[0]))\r
continue\r
Message="Cannot find include file", \r
ExtraData=str(IncList[0]))\r
continue\r
+\r
+ #\r
+ # Check if single line has correct '"'\r
+ #\r
+ if Line.startswith(u'#string') and Line.find(u'#language') > -1 and Line.find('"') > Line.find(u'#language'):\r
+ if not Line.endswith('"'):\r
+ EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID,\r
+ ExtraData='''The line %s misses '"' at the end of it in file %s'''\r
+ % (LineCount, File.Path))\r
+\r
#\r
# Between Name entry and Language entry can not contain line feed\r
#\r
#\r
# Between Name entry and Language entry can not contain line feed\r
#\r