JAL-2119 count and report total invalid anchor links
authorJim Procter <jprocter@issues.jalview.org>
Thu, 8 Sep 2016 13:50:32 +0000 (14:50 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 8 Sep 2016 13:50:32 +0000 (14:50 +0100)
utils/HelpLinksChecker.java

index 1ad5322..5ba9097 100644 (file)
@@ -34,6 +34,8 @@ public class HelpLinksChecker
 
   private int anchorRefCount = 0;
 
+  private int invalidAnchorRefCount = 0;
+
   private int externalHrefCount = 0;
 
   private int invalidMapUrlCount = 0;
@@ -192,6 +194,8 @@ public class HelpLinksChecker
             internalHrefCount, anchorRefCount));
     System.out.println(invalidInternalHrefCount
             + " invalid internal href links");
+    System.out.println(invalidAnchorRefCount
+            + " invalid internal anchor links");
     System.out.println(externalHrefCount + " external href links");
     if (internetAvailable)
     {
@@ -269,6 +273,7 @@ public class HelpLinksChecker
                 System.out.println(String.format(
                         "Invalid anchor: %s at line %d of %s", anchor,
                         lineNo, getPath(htmlFile)));
+                invalidAnchorRefCount++;
               }
             }
           }