Branch Coverage

blib/lib/App/GitHooks.pm
Criterion Covered Total %
branch 72 96 75.0


line true false branch
476 1 24 if scalar keys %args != 0
483 0 24 unless defined $name
486 0 24 if scalar grep({$_ eq $name;} @$HOOK_NAMES) == 0
488 5 19 if (my $env_var = _should_skip($name))
494 0 19 if scalar keys %args != 0
510 0 19 if $terminal->is_utf8
517 0 12 unless defined $hook_exit_code
529 9 9 if ($exit) { }
575 3 47 unless defined $arguments
579 1 49 unless Data::Validate::Type::is_arrayref($arguments)
581 1 48 unless defined $name
584 1 47 if scalar grep({$_ eq $name;} @$HOOK_NAMES) == 0
585 0 47 if scalar keys %args != 0
606 17 29 if defined $force_use_color
610 17 29 if defined $force_is_utf8
640 1 3 if scalar keys %args != 0
647 2 1 if (defined $name)
650 1 1 if scalar grep({$_ eq $name;} @$HOOK_NAMES) == 0
685 0 33 unless defined $hook_name
693 19 14 unless defined $self->{'plugins'}
718 0 19 if (defined $limit_plugins)
731 18 1 if ($force_plugins =~ /\w/) { }
736 16 2 $_ =~ /^App/ ? :
743 20 18 unless $forced_plugins{$plugin}
751 0 18 if (scalar keys %forced_plugins != 0)
764 2 0 if $plugin =~ /^App\:\:GitHooks\:\:Plugin\:\:Test\:\:/x
781 34 290 unless $plugin->can('run_' . $hook)
790 0 18 unless $hooks_declared
810 47 97 unless (defined $self->{'config'})
816 25 22 if (defined $ENV{'GITHOOKSRC_FORCE'} and -e $ENV{'GITHOOKSRC_FORCE'}) { }
22 0 elsif (-e '.githooksrc') { }
0 0 elsif (defined $ENV{'GITHOOKSRC'} and -e $ENV{'GITHOOKSRC'}) { }
0 0 elsif (defined $ENV{'HOME'} and -e $ENV{'HOME'} . '/.githooksrc') { }
840 47 0 defined $config_file ? :
849 1 143 if $min_version and $min_version gt $VERSION
876 3 3 if (defined $value)
878 2 1 if ($value =~ /^(?:0|1)$/) { }
904 0 8 $self->get_terminal->is_utf8 ? :
922 0 3 $self->get_terminal->is_utf8 ? :
940 0 1 $self->get_terminal->is_utf8 ? :
959 14 0 unless (defined $self->{'staged_changes'})
986 17 28 if (defined $value)
1104 0 23 unless defined $information
1107 0 23 if (defined $terminal_width) { }
1123 23 21 defined $_ && $_ ne '' ? :
1142 0 28 $self->use_colors ? :
1186 19 1 unless exists $ENV{'GITHOOKS_SKIP'} or exists $ENV{'GITHOOKS_DISABLE'}
1188 1 4 if $ENV{'GITHOOKS_DISABLE'}