Branch Coverage

blib/lib/App/GitHooks/Plugin/BlockNOCOMMIT.pm
Criterion Covered Total %
branch 12 22 54.5


line true false branch
108 0 7 if scalar keys %args != 0
112 0 7 unless Data::Validate::Type::is_instance($app, 'class', 'App::GitHooks')
114 0 7 unless defined $file
116 0 7 unless defined $git_action
120 0 7 if $git_action eq 'D'
125 0 7 if $staged_changes->is_merge
129 0 7 if $staged_changes->is_revert
134 7 0 if ($git_action eq 'A') { }
162 0 0 unless $$commit_attributes{'author-mail'} eq 'not.committed.yet'
178 22 6 unless $code =~ m[ (?://|\#) # Support Perl and Javascript comments. .* # Support NOCOMMIT anywhere in the comment, not just at the beginning. \bNO\s*COMMIT\b # Support NOCOMMIT and NO COMMIT. ]xi
192 6 1 if scalar @violations != 0