mailr10241 - in /branches/bieri_gui: ./ scripts/code_validator


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on January 15, 2010 - 15:35:
Author: bugman
Date: Fri Jan 15 15:35:50 2010
New Revision: 10241

URL: http://svn.gna.org/viewcvs/relax?rev=10241&view=rev
Log:
Merged revisions 10240 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3

........
  r10240 | bugman | 2010-01-15 15:35:22 +0100 (Fri, 15 Jan 2010) | 5 lines
  
  Bug fixes for the code validator script.
  
  The 4 character spacing check was faulty.
........

Modified:
    branches/bieri_gui/   (props changed)
    branches/bieri_gui/scripts/code_validator

Propchange: branches/bieri_gui/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jan 15 15:35:50 2010
@@ -1,1 +1,1 @@
-/1.3:1-10238
+/1.3:1-10240

Modified: branches/bieri_gui/scripts/code_validator
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/scripts/code_validator?rev=10241&r1=10240&r2=10241&view=diff
==============================================================================
--- branches/bieri_gui/scripts/code_validator (original)
+++ branches/bieri_gui/scripts/code_validator Fri Jan 15 15:35:50 2010
@@ -714,23 +714,22 @@
             if not row:
                 continue
 
-            # Skip the line if within an array and ']' is encountered.
-            skip = 0
+            # Count the '[' and ']' characters.
             for char in line:
-                if char == ']':
-                    in_array = in_array - 1
-                    skip = 1
-            if skip:
-                continue
-
-            # Determine if an array has been started.
-            for char in line:
+                # In.
                 if char == '[':
                     in_array = in_array + 1
 
+                # Out.
+                elif char == ']':
+                    in_array = in_array - 1
+
             # Go to the next line if still within an array.
-            if in_array:
-                continue
+            if in_array > 0:
+                continue
+            elif in_array < 0:
+                print("Bug detected at line %i.  Unpaired terminating ] 
encountered.")
+                in_array = 0
 
             # Loop over the characters of the line.
             for char in line:




Related Messages


Powered by MHonArc, Updated Mon Jan 18 17:20:02 2010