List:Commits« Previous MessageNext Message »
From:mcbrown Date:September 6 2007 5:13am
Subject:svn commit - mysqldoc@docsrva: r7711 - trunk/tools
View as plain text  
Author: mcbrown
Date: 2007-09-06 07:13:11 +0200 (Thu, 06 Sep 2007)
New Revision: 7711

Log:
Making sure we initialize the hashes we use later



Modified:
   trunk/tools/MySQLDeepCheck.pm


Modified: trunk/tools/MySQLDeepCheck.pm
===================================================================
--- trunk/tools/MySQLDeepCheck.pm	2007-09-06 03:35:57 UTC (rev 7710)
+++ trunk/tools/MySQLDeepCheck.pm	2007-09-06 05:13:11 UTC (rev 7711)
Changed blocks: 11, Lines Added: 22, Lines Deleted: 1; 4096 bytes

@@ -27,6 +27,8 @@
                   'checklinelength' => 0,
                   'savedtext' => '',
                   'inemphasis' => 0,
+                  'issuelist' => {},
+                  'issueclearlist' => {},
                   'loc' => [],
               }, $class;
 }

@@ -263,7 +265,7 @@
         if ($self->{linktext} =~ m/[a-zA-Z0-9]+/ && $element->{Name} eq 'xref')
         {
             push(@{$self->{issuelist}},
-                 {'parentid' => $self->{tabledefs}->{$self->{tablecount}}->{section},
+                 {'parentid' => $self->{currsection},
                   'type' => 'xref',
                   'class' => 'todo',
                   'text' => join('',"You cannot use <xref> to '",

@@ -307,8 +309,11 @@
     {
         # Check the number of columns defined, and specified, match
 
+        my $errorcounter = 0;
+
         if (!defined($self->{tabledefs}->{$self->{tablecount}}->{speccolumns}))
         {
+            $errorcounter++;
             push(@{$self->{issuelist}},
                  {'parentid' => $self->{tabledefs}->{$self->{tablecount}}->{section},
                   'type' => 'tablefault',

@@ -319,6 +324,7 @@
         }
         elsif (!defined($self->{tabledefs}->{$self->{tablecount}}->{defcolumns}))
         {
+            $errorcounter++;
             push(@{$self->{issuelist}},
                  {'parentid' => $self->{tabledefs}->{$self->{tablecount}}->{section},
                   'type' => 'tablefault',

@@ -330,6 +336,7 @@
         elsif ($self->{tabledefs}->{$self->{tablecount}}->{speccolumns} != 
                $self->{tabledefs}->{$self->{tablecount}}->{defcolumns})
         {
+            $errorcounter++;
             push(@{$self->{issuelist}},
                  {'parentid' => $self->{tabledefs}->{$self->{tablecount}}->{section},
                   'type' => 'tablefault',

@@ -344,6 +351,7 @@
                ($self->{tabledefs}->{$self->{tablecount}}->{speccolumns} != 
                $self->{tabledefs}->{$self->{tablecount}}->{maxcolumns}))
         {
+            $errorcounter++;
             push(@{$self->{issuelist}},
                  {'parentid' => $self->{tabledefs}->{$self->{tablecount}}->{section},
                   'type' => 'tablefault',

@@ -359,6 +367,7 @@
 
         if (!defined($self->{tabledefs}->{$self->{tablecount}}->{colwidth}))
         {
+            $errorcounter++;
             push(@{$self->{issuelist}},
                  {'parentid' => $self->{tabledefs}->{$self->{tablecount}}->{section},
                   'type' => 'tablefault',

@@ -369,6 +378,7 @@
         }
         elsif ($self->{tabledefs}->{$self->{tablecount}}->{colwidth} == 0)
         {
+            $errorcounter++;
             push(@{$self->{issuelist}},
                  {'parentid' => $self->{tabledefs}->{$self->{tablecount}}->{section},
                   'type' => 'tablefault',

@@ -379,6 +389,7 @@
         }
         elsif ($self->{tabledefs}->{$self->{tablecount}}->{colwidth} == 0)
         {
+            $errorcounter++;
             push(@{$self->{issuelist}},
                  {'parentid' => $self->{tabledefs}->{$self->{tablecount}}->{section},
                   'type' => 'tablefault',

@@ -389,6 +400,7 @@
         }
         elsif ($self->{tabledefs}->{$self->{tablecount}}->{colwidth} > 100)
         {
+            $errorcounter++;
             push(@{$self->{issuelist}},
                  {'parentid' => $self->{tabledefs}->{$self->{tablecount}}->{section},
                   'type' => 'tablefault',

@@ -398,6 +410,15 @@
                                  ": Total column width is more than 100%\n")});
         }
 
+        if ($errorcounter == 0)
+        {
+            push @{$self->{issueclearlist}},
+                 {'parentid' => $self->{tabledefs}->{$self->{tablecount}}->{section},
+                  'type' => 'tablefault',
+                  'class' => 'alert',
+              };
+            
+
         $self->{intable} = 0;
     }
 }    


Thread
svn commit - mysqldoc@docsrva: r7711 - trunk/toolsmcbrown6 Sep