1. Ignore the commented content when parsing a file to search line no of error content
authorhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Tue, 11 Dec 2007 06:33:23 +0000 (06:33 +0000)
committerhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Tue, 11 Dec 2007 06:33:23 +0000 (06:33 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@917 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/Common/String.py

index 0c40b73..f34e217 100644 (file)
@@ -619,6 +619,11 @@ def GetLineNo(FileContent, Line):
     LineList = FileContent.splitlines()\r
     for Index in range(len(LineList)):\r
         if LineList[Index].find(Line) > -1:\r
+            #\r
+            # Ignore statement in comment\r
+            #\r
+            if LineList[Index].strip()[0] == DataType.TAB_COMMENT_SPLIT:\r
+                continue\r
             return Index + 1\r
 \r
     return -1\r