Branch Coverage

blib/lib/Perl/Critic/Config.pm
Criterion Covered Total %
branch 92 104 88.4


line true false branch
54 55 225 if (defined $args{'-top'} or defined $args{'-theme'})
139 82 198 if (not defined $profile_source or $profile_source ne "NONE")
144 4 276 if ($errors->has_exceptions)
154 9 1391 $_[0] ? :
163 1 8043 unless ($args{'-policy'})
170 7887 156 if (builtin::blessed($policy))
191 0 8042 unless my $config = $policy_object->__get_config
197 7944 98 if ($policy_object->initialize_if_enabled($config)) { }
216 2 80 if $errors->has_exceptions
221 580 11020 if ($self->single_policy)
222 147 433 if ($self->_policy_is_single_policy($policy))
229 1 11019 unless $policy->is_safe or $self->unsafe_allowed
232 579 10440 $self->only ? :
235 229 10790 if $self->_policy_is_disabled($policy)
236 1599 9420 if $self->_policy_is_enabled($policy)
237 2538 8481 if $self->_policy_is_unimportant($policy)
238 145 10874 unless $self->_policy_is_thematic($policy)
239 38 10981 if $self->_policy_is_included($policy)
240 36 10983 if $self->_policy_is_excluded($policy)
243 3279 7740 unless $load_me
248 2 78 if ($self->single_policy and scalar $self->policies != 1)
312 0 580 unless @patterns
336 1 1 if (scalar $self->policies == 0) { }
366 8 832 if ($args_value)
369 4 4 if (ref $args_value) { }
377 832 8 unless (@regexes)
381 556 276 if (ref $default_value) { }
1 275 elsif ($default_value) { }
392 3 15 unless (eval {
410 837 3 unless ($found_errors)
429 0 280 if ($args_value) { }
441 1 279 unless ($Perl::Critic::Config::PROFILE_STRICTNESSES{$profile_strictness})
470 0 280 if ($args_value) { }
482 1 279 if (is_integer($verbosity) and not is_valid_numeric_verbosity($verbosity)) { }
512 68 212 if ($args_value) { }
524 274 6 if (is_integer($severity)) { }
1 5 elsif (not &any(sub {
525 273 1 if ($severity >= $Perl::Critic::Config::SEVERITY_LOWEST and $severity <= $Perl::Critic::Config::SEVERITY_HIGHEST) { }
571 2 278 if (defined $args_value and $args_value ne '') { }
583 279 1 if (is_integer($top) and $top >= 0) { }
609 52 228 if ($args_value) { }
621 0 280 if ($theme_rule =~ /$Perl::Critic::Config::RULE_INVALID_CHARACTER_REGEX/msx) { }
642 1 279 if ($Perl::Critic::Config::EVAL_ERROR) { }
657 0 279 unless (eval {
672 0 280 if ($args_value) { }
0 280 elsif ($ENV{'PERLCRITIC_PAGER'}) { }
683 0 280 if ($pager eq "\$PAGER")
702 5 1395 if (defined $args_value) { }
718 1400 0 if (eval {
732 5 1395 if ($found_errors) { }
760 0 280 'ARRAY' eq ref $args_value ? :
945 0 87 if $self->{'_program_extensions_as_regexes'}