This is an automated email from the git hooks/post-receive script.

abe pushed a commit to annotated tag v1.18
in repository libdevel-cover-perl.

commit dbfe3d11987570d2c8af92eb96c90d7a25f05483
Author: Paul Johnson <p...@pjcj.net>
Date:   Fri Mar 27 00:50:38 2015 +0100

    Link to next uncovered statement in html_basic.
    
    Patch from H.Merijn Brand.
---
 Changes                              |  1 +
 lib/Devel/Cover/Report/Html_basic.pm | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/Changes b/Changes
index dca52d3..7408f4c 100644
--- a/Changes
+++ b/Changes
@@ -3,6 +3,7 @@ Devel::Cover history
 {{$NEXT}}
  - Remove dependency on CGI (use HTML::Entities instead) (Lee Johnson).
  - Fix a use of the wrong type of null constant (Zefram) (RT #103102).
+ - Link to next uncovered statement in html_basic (H.Merijn Brand).
 
 Release 1.17 - 20 September 2014
  - Get cpancover to release quality.
diff --git a/lib/Devel/Cover/Report/Html_basic.pm 
b/lib/Devel/Cover/Report/Html_basic.pm
index 0f13f96..963a623 100644
--- a/lib/Devel/Cover/Report/Html_basic.pm
+++ b/lib/Devel/Cover/Report/Html_basic.pm
@@ -217,6 +217,19 @@ sub print_file {
     }
     close F or die "Unable to close $R{file}: $!";
 
+    # Add forward references to uncovered lines ...
+    # first line has a ref to the first uncovered line unless
+    # the first line already is uncovered in which case it links
+    # to the *next* uncovered line
+    {  my @unc = grep { $_->{criteria}[0]{class} eq "c0" &&
+                         $_->{criteria}[0]{text}  eq  "0" } @lines;
+       while (@unc) {
+           my $u = pop @unc;
+           my $link = "#" . $u->{number};
+           (@unc ? $unc[-1] : $lines[0])->{criteria}[0]{link} ||= $link;
+       }
+    }
+
     my $vars = {
         R     => \%R,
         lines => \@lines,

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libdevel-cover-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to