| line | % | coverage | branch |
| 1357 | 50 | T | F | unless exists $params->{'input_file'} |
| 1373 | 100 | T | F | unless (-f $self->{'input_file'}) |
| 1464 | 50 | T | F | unless my $document = "PPI::Document"->new($self->{'input_file'}) |
| 1486 | 100 | T | F | unless $params->{'no_write'} |
| 1517 | 100 | T | F | unless (defined $document) |
| 1521 | 100 | T | F | if (@$pkgs == 0) |
| 1523 | 50 | T | F | $package_stmt ? : |
| 1525 | 50 | T | F | if @$pkgs > 1 |
| 1575 | 50 | T | F | unless defined $name |
| 1576 | 100 | T | F | if $name =~ /^(BEGIN|END|DESTROY|AUTOLOAD|CHECK|INIT|UNITCHECK)$/ |
| 1577 | 50 | T | F | if $name =~ /::/ |
| 1580 | 100 | T | F | if ($name =~ /^_/ and not $name =~ /^_(new|init|build)/) |
| 1581 | 100 | T | F | unless $self->{'include_private'} |
| 1598 | 100 | T | F | if ($content =~ /\bclass\b/) |
| 1612 | 0 | T | F | if ($content =~ /^\s*(before|after|around)\s+['"]?(\w+)['"]?\b/) |
| 1622 | 0 | T | F | if ($next_sib and $next_sib->isa("PPI::Statement::Sub")) |
| 1642 | 100 | T | F | if ($seen{$n}++) { } |
| 1696 | 50 | T | F | unless defined $extracted |
| 1710 | 50 | T | F | if ($method_name =~ /^_/ and not $method_name =~ /^_(new|init|build)/) |
| 1711 | 0 | T | F | unless $self->{'include_private'} |
| 1776 | 100 | T | F | if ($current->isa('PPI::Token::Pod')) { } |
| 100 | T | F | elsif ($current->isa('PPI::Token::Comment')) { } |
| 100 | T | F | elsif ($current->isa('PPI::Token::Whitespace') or $current->isa('PPI::Token::Separator')) { } |
| 100 | T | F | elsif ($current->isa('PPI::Statement::Include')) { } |
| 1782 | 50 | T | F | if ($comment =~ /#\s*(?:param|arg|input)\s+\$(\w+)\s*:\s*(.+)/i) |
| 1848 | 50 | T | F | if ($method->{'fields'} and keys %{$$method{"fields"};}) |
| 1871 | 100 | T | F | if ($self->{'strict_pod'} and $pod) |
| 1882 | 100 | T | F | if (@validation_errors) |
| 1890 | 100 | T | F | if ($self->{'strict_pod'} == $STRICT_POD_FATAL) { } |
| 1903 | 100 | T | F | if ($validator_params) { } |
| 1914 | 0 | T | F | unless $pod_params->{$name}{'_from_input_spec'} |
| 1917 | 0 | T | F | if defined $pod_p->{'optional'} |
| 1918 | 0 | T | F | if defined $pod_p->{'memberof'} |
| 1919 | 0 | T | F | if defined $pod_p->{'matches'} |
| 1920 | 0 | T | F | if defined $pod_p->{'type'} |
| 1921 | 0 | T | F | if defined $pod_p->{'min'} |
| 1922 | 0 | T | F | if defined $pod_p->{'max'} |
| 1926 | 100 | T | F | if (keys %$fields) |
| 1954 | 100 | T | F | if ($method->{'name'} ne "new" and $needs_object) |
| 1961 | 50 | T | F | unless (ref $input_confidence) |
| 1982 | 50 | T | F | if ($input_confidence->{'per_parameter'}) |
| 2001 | 100 | T | F | $level_rank{$input_level} < $level_rank{$output_level} ? : |
| 2007 | 100 | T | F | if ($relationships and @{$relationships;}) |
| 2013 | 100 | T | F | if keys %$attributes |
| 2014 | 100 | T | F | if keys %$postfix_derefs |
| 2015 | 100 | T | F | if keys %$fields |
| 2018 | 100 | T | F | if ($method->{'class'}) |
| 2028 | 50 | T | F | defined $_ ? : |
| 2036 | 100 | T | F | if ($self->_method_has_numeric_intent($schema)) |
| 2042 | 0 | T | F | defined $_ ? : |
| 2046 | 100 | T | F | defined $v ? : |
| 2047 | 50 | T | F | unless $seen{$key}++ |
| 2053 | 50 | T | F | if (keys %$hints) |
| 2057 | 100 | T | F | unless exists $schema->{'_yamltest_hints'}{$k} |
| 2061 | 100 | T | F | if ($level_rank{$overall} < $level_rank{$LEVEL_MEDIUM} and $level_rank{$overall} < $self->{'confidence_threshold'} * 4) |
| 2079 | 50 | T | F | if ($schema->{'output'}) |
| 2148 | 100 | T | F | if $schema->{'output'} and $schema->{'output'}{'type'} and $schema->{'output'}{'type'} =~ /^(number|integer)$/ |
| 2151 | 100 | T | F | unless $schema->{'input'} |
| 2152 | 100 | T | F | if $p->{'optional'} |
| 2153 | 100 | T | F | if $p->{'type'} and $p->{'type'} =~ /^(number|integer)$/ |
| 2224 | 100 | T | F | if (keys %fields_seen > 1) |
| 2232 | 50 | T | F | if ($code =~ /\$self\s*->\s*\{\s*['"]?([^}'"]+)['"]?\s*\}\s*=\s*shift\s*;/ and $code =~ /return\s+\$self\s*->\s*\{\s*['"]?\Q$1\E['"]?\s*\}\s*;/ and $code =~ /if\s*\(\s*\@_/) { } |
| 100 | T | F | elsif ($code =~ /if\s*\(\s*(?:\@_|[\$]\w+)/ and $code =~ /\$self\s*->\s*\{\s*['"]?([^}'"]+)['"]?\s*\}\s*=\s*(?:shift|\@_|\$_\[\d+\]|\$\w+)\b/x and $code =~ /return\b/) { } |
| 100 | T | F | elsif ($code =~ /return\s+\$self\s*->\s*\{\s*['"]?([^}'"]+)['"]?\s*\}\s*;/) { } |
| 100 | T | F | elsif ($code =~ /return\s+\$self\b/ and $code =~ /\$self\s*->\s*\{\s*['"]?([^}'"]+)['"]?\s*\}\s*=\s*\$(\w+)\s*;/) { } |
| 2240 | 0 | T | F | unless (defined $property) |
| 2241 | 0 | T | F | if ($code =~ /\$self\s*->\s*\{\s*['"]?([^}'"]+)['"]?\s*\}\s*=\s*shift\s*;/) |
| 2261 | 0 | T | F | if (my $pod = $method->{'pod'}) |
| 2262 | 0 | T | F | if ($pod =~ /\b(LWP::UserAgent(?:::\w+)*)\b/) |
| 2289 | 50 | T | F | unless (defined $property) |
| 2290 | 50 | T | F | if ($code =~ /\$self\s*->\s*\{\s*['"]?([^}'"]+)['"]?\s*\}\s*=/) |
| 2294 | 100 | T | F | if ($code =~ /validate_strict/) { } |
| 2300 | 50 | T | F | if ($code =~ /blessed\s*\(\s*\$(\w+)\s*\)/) { } |
| 2329 | 100 | T | F | if (my $pod = $method->{'pod'}) |
| 2330 | 50 | T | F | if ($pod =~ /\b(LWP::UserAgent(?:::\w+)*)\b/) |
| 2354 | 50 | T | F | if (ref $schema->{'input'} eq "HASH") |
| 2356 | 50 | T | F | if (scalar @input_keys > 1) { } |
| 50 | T | F | elsif (@input_keys == 1) { } |
| 2377 | 100 | T | F | unless ($code =~ /\$self\s*->\s*\{\s*['"]?\Q$property\E['"]?\s*\}\s*=\s*(?:shift|\$\w+\s*=\s*shift|\@_|\$_\[\d+\])/) |
| 2381 | 100 | T | F | if (scalar @returns == scalar @self_returns) |
| 2423 | 100 | T | F | if ($schema->{'output'}{'_returns_self'}) { } |
| 50 | T | F | elsif (scalar keys %{$$schema{'output'};} != 0) { } |
| 2424 | 50 | T | F | if ($schema->{'output'}{'type'} ne "object") |
| 2427 | 50 | T | F | if ($schema->{'output'}{'isa'} ne $self->{'_package_name'}) |
| 2438 | 100 | T | F | if (exists $schema->{'accessor'}) |
| 2439 | 50 | T | F | if ($schema->{'accessor'}{'type'} and $schema->{'accessor'}{'type'} =~ /setter|getset/ and $schema->{'input'}) |
| 2443 | 100 | T | F | if ($in->{'type'} and $in->{'type'} eq "object") |
| 2446 | 50 | T | F | $in->{'isa'} ? : |
| 2457 | 100 | T | F | if ($schema->{'accessor'}{'type'} and $schema->{'accessor'}{'property'} and $schema->{'accessor'}{'type'} =~ /getter|getset/ and !defined($schema->{'output'}{'type'}) || $schema->{'output'}{'type'} eq 'string') |
| 2459 | 100 | T | F | if (my $pod = $method->{'pod'}) |
| 2461 | 100 | T | F | if ($pod =~ /\bUser[- ]?Agent\b.*\bobject\b/i) |
| 2536 | 50 | T | F | unless $res->{'input'} |
| 50 | T | F | if $res and ref $res eq "HASH" and keys %{{} unless $res->{'input'};} |
| 2570 | 50 | T | F | if ($child->isa("PPI::Statement") or $child->isa("PPI::Statement::Expression")) |
| 2579 | 0 | T | F | if ($tokens[$i]->isa('PPI::Token::Word') || $tokens[$i]->isa('PPI::Token::Quote') and $tokens[$i + 1]->isa("PPI::Structure::Constructor")) |
| 2588 | 0 | T | F | unless $key and $val |
| 2592 | 0 | T | F | unless $inner->isa("PPI::Statement") or $inner->isa("PPI::Statement::Expression") |
| 2599 | 0 | T | F | unless $k and $v |
| 2602 | 0 | T | F | $v->can('content') ? : |
| 2603 | 0 | T | F | if defined $value |
| 2605 | 0 | T | F | if ($keyname eq 'type') { } |
| 0 | T | F | elsif ($keyname eq 'optional') { } |
| 0 | T | F | elsif ($keyname =~ /^(min|max)$/ and &looks_like_number($value)) { } |
| 0 | T | F | elsif ($keyname eq 'matches') { } |
| 2608 | 0 | T | F | $value ? : |
| 2658 | 100 | T | F | if ref $code and $code->can("find") |
| 2684 | 100 | T | F | unless $code =~ /\bvalidate_strict\s*\(/ |
| 2686 | 50 | T | F | unless my $doc = $self->_ppi($code) |
| 2689 | 100 | T | F | if $_[1]->isa("PPI::Token::Word") |
| 2690 | 50 | T | F | unless my $calls = $doc->find(sub {
$_[1]->content eq "validate_strict" or $_[1]->content eq "Params::Validate::Strict::validate_strict" if $_[1]->isa("PPI::Token::Word");
}
) |
| 2697 | 50 | T | F | unless (defined $list) |
| 2699 | 50 | T | F | unless defined $next |
| 2700 | 100 | T | F | if ($next->content =~ /schema\s*=>\s*(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/s) |
| 2702 | 50 | T | F | if $schema_text =~ /$UNSAFE_KEYWORD_RE/ |
| 2708 | 50 | T | F | if (scalar keys %{$schema;}) |
| 2717 | 50 | T | F | unless $list |
| 2721 | 0 | T | F | unless $schema_block |
| 2724 | 0 | T | F | if $schema |
| 2749 | 100 | T | F | unless $code =~ /\bvalidate\s*\(/ |
| 2751 | 50 | T | F | unless my $doc = $self->_ppi($code) |
| 2754 | 100 | T | F | if $_[1]->isa("PPI::Token::Word") |
| 2755 | 50 | T | F | unless my $calls = $doc->find(sub {
$_[1]->content eq "validate" or $_[1]->content eq "Params::Validate::validate" if $_[1]->isa("PPI::Token::Word");
}
) |
| 2762 | 50 | T | F | unless (defined $list) |
| 2766 | 50 | T | F | if ($schema_text and not $schema_text =~ /$UNSAFE_KEYWORD_RE/) |
| 2773 | 100 | T | F | if (scalar keys %{$schema;}) |
| 2776 | 50 | T | F | if (my $type = $field->{'type'}) |
| 2777 | 100 | T | F | if ($type eq 'ARRAYREF') { } |
| 50 | T | F | elsif ($type eq 'SCALAR') { } |
| 2794 | 50 | T | F | unless $list |
| 2798 | 0 | T | F | unless $schema_block |
| 2801 | 0 | T | F | if $schema |
| 2842 | 100 | T | F | if (substr($rest, 0, 1) eq "{") |
| 2846 | 50 | T | F | unless defined $extracted |
| 2850 | 100 | T | F | if (substr($rest, 0, 1) eq ",") |
| 2858 | 100 | T | F | unless $found_comma |
| 2891 | 100 | T | F | unless $code =~ /\bvalidated_hash\s*\(/ |
| 2893 | 50 | T | F | unless my $doc = $self->_ppi($code) |
| 2896 | 100 | T | F | if $_[1]->isa("PPI::Token::Word") |
| 2897 | 50 | T | F | unless my $calls = $doc->find(sub {
$_[1]->content eq "validated_hash" if $_[1]->isa("PPI::Token::Word");
}
) |
| 2904 | 50 | T | F | unless (defined $list) |
| 2908 | 50 | T | F | if ($schema_text and not $schema_text =~ /$UNSAFE_KEYWORD_RE/) |
| 2916 | 50 | T | F | if (scalar keys %{$schema;}) |
| 2919 | 50 | T | F | if (my $isa = delete $field->{'isa'}) |
| 2922 | 100 | T | F | if (exists $field->{'required'}) { } |
| 2924 | 100 | T | F | $required ? : |
| 2928 | 100 | T | F | if (ref $field->{'default'} eq "CODE") |
| 2935 | 50 | T | F | if (my $type = $field->{'type'}) |
| 2936 | 50 | T | F | if ($type eq 'ARRAYREF') { } |
| 50 | T | F | elsif ($type eq 'SCALAR') { } |
| 2953 | 0 | T | F | unless $list |
| 2957 | 0 | T | F | unless $schema_block |
| 2960 | 0 | T | F | if $schema |
| 2989 | 50 | T | F | unless $block and $block->can("children") |
| 2993 | 0 | T | F | unless $result and ref $result eq "HASH" and $result->{'input'} |
| 3030 | 100 | T | F | exists $spec->{'optional'} ? : |
| 3065 | 100 | T | F | unless my $function = $self->_extract_function_name($code) |
| 3067 | 100 | T | F | unless my $doc = $self->{'_document'} |
| 3068 | 100 | T | F | unless my $stmt = $self->_find_signature_statement($doc, $function) |
| 3070 | 50 | T | F | unless my $signature_expr = $self->_extract_signature_expression($stmt, $function) |
| 3072 | 100 | T | F | unless my $meta = $self->_compile_signature_isolated($function, $signature_expr) |
| 3094 | 100 | T | F | if $code =~ /^\s*sub\s+([a-zA-Z0-9_]+)/ |
| 3118 | 100 | T | F | if $_[1]->isa("PPI::Statement") |
| 3120 | 100 | T | F | unless my $statements = $doc->find(sub {
$_[1]->content =~ /^\s*signature_for\b/ if $_[1]->isa("PPI::Statement");
}
) |
| 3124 | 50 | T | F | if ($content =~ /^\s*signature_for\s+\Q$function\E\b/) |
| 3154 | 100 | T | F | if ($content =~ /^\s*signature_for\s+\Q$function\E\s*=>\s*(.+?);?\s*$/s) |
| 3221 | 100 | T | F | unless ($self->{'allow_signature_exec'}) |
| 3225 | 50 | T | F | if $self->{'verbose'} |
| 3239 | 50 | T | F | if ($signature_expr =~ /$UNSAFE_KEYWORD_RE/ or $signature_expr =~ /$UNSAFE_CHAR_RE/) |
| 3347 | 100 | T | F | if ($stderr and length $stderr) |
| 3348 | 50 | T | F | if $self->{'verbose'} |
| 3355 | 100 | T | F | unless (defined $stdout and length $stdout) |
| 3356 | 50 | T | F | if $self->{'verbose'} |
| 3361 | 50 | T | F | if ($@) |
| 3362 | 50 | T | F | if $self->{'verbose'} |
| 3410 | 50 | T | F | unless $meta->{'parameters'} |
| 3413 | 100 | T | F | unless (exists $type_map{$p->{'type'}}) |
| 3421 | 100 | T | F | $p->{'optional'} ? : |
| 3429 | 100 | T | F | if (my $ret = $meta->{'returns'}) |
| 3432 | 50 | T | F | unless (exists $type_map{$ret->{'type'}}) |
| 3489 | 100 | T | F | unless $pod |
| 3496 | 100 | T | F | if ($pod =~ /=head2\s+\w+\s*\(([^)]+)\)/s) |
| 3502 | 50 | T | F | if @sig_params and $sig_params[0] =~ /^(self|class)$/i |
| 3517 | 100 | T | F | if ($pod =~ /(?:Parameters?|Arguments?|Inputs?):?\s*\n((?:\s*\$.*\n)+)/is) { } |
| 100 | T | F | elsif ($pod =~ /^=head\d+\s+(?:Parameters?|Arguments?|Inputs?)\b.*?\n(.*?)(?=^=head|\Z)/ism) { } |
| 3522 | 100 | T | F | if ($param_section) |
| 3528 | 50 | T | F | if ($line =~ /C<\$(\w+)>\s*\((Required|Mandatory)\)/i) |
| 3536 | 100 | T | F | if ($line =~ /^\s*\$(\w+)\s*-\s*(\w+)(?:\s*\(([^)]+)\))?\s*,?\s*(.*)$/i or $line =~ /^\s*C<\$(\w+)>\s*-\s*(\w+)(?:\s*\(([^)]+)\))?\s*,?\s*(.*)$/i) |
| 3541 | 100 | T | F | if $desc |
| 3544 | 100 | T | F | if $name =~ /^(self|class|return|returns?)$/i |
| 3549 | 100 | T | F | unless (exists $params{$name}{'position'}) |
| 3555 | 50 | T | F | if $type eq "int" |
| 3556 | 50 | T | F | if $type eq "num" or $type eq "float" |
| 3557 | 50 | T | F | if $type eq "bool" |
| 3558 | 50 | T | F | if $type eq "array" |
| 3559 | 50 | T | F | if $type eq "hash" |
| 3564 | 100 | T | F | if ($constraint) |
| 3571 | 100 | T | F | if ($full_text =~ /\boptional\b/i) { } |
| 100 | T | F | elsif ($full_text =~ /required|mandatory/i) { } |
| 3580 | 100 | T | F | if ($desc =~ /\b(email|url|uri|path|filename)\b/i) |
| 3587 | 100 | T | F | if ($desc and $desc =~ m[matches?\s+(/[^/]+/|qr/.+?/)]i) |
| 3591 | 100 | T | F | $constraint ? : |
| 100 | T | F | $desc ? : |
| 3603 | 100 | T | F | if exists $params{$name} |
| 3606 | 50 | T | F | if $desc |
| 3609 | 100 | T | F | if $name =~ /^(self|class|return|returns?)$/i |
| 3614 | 50 | T | F | if $type eq "int" |
| 3615 | 50 | T | F | if $type eq "num" or $type eq "float" |
| 3616 | 50 | T | F | if $type eq "bool" |
| 3617 | 50 | T | F | if $type eq "array" |
| 3618 | 50 | T | F | if $type eq "hash" |
| 3623 | 50 | T | F | if ($constraint) |
| 3629 | 50 | T | F | if ($desc) |
| 3630 | 50 | T | F | if ($desc =~ /\boptional\b/i) { } |
| 50 | T | F | elsif ($desc =~ /required|mandatory/i) { } |
| 3637 | 50 | T | F | if ($desc =~ m[matches?\s+(/[^/]+/|qr/.+?/)]i) |
| 3642 | 50 | T | F | $constraint ? : |
| 3652 | 50 | T | F | unless defined $name and length $name |
| 3657 | 50 | T | F | if $name =~ /^(self|class|return|returns?)$/i |
| 3663 | 100 | T | F | if ($desc =~ /^\s*(string|integer|int|number|num|float|boolean|bool|array|arrayref|hash|hashref|any)\b(?:\s*\(([^)]+)\))?/i) { } |
| 3668 | 50 | T | F | if $type eq "int" |
| 3669 | 50 | T | F | if $type eq "num" or $type eq "float" |
| 3670 | 50 | T | F | if $type eq "bool" |
| 3671 | 50 | T | F | if $type eq "array" |
| 3672 | 50 | T | F | if $type eq "hash" |
| 3676 | 100 | T | F | if ($constraint) |
| 3683 | 50 | T | F | if ($desc =~ /\bstring\b/i) { } |
| 50 | T | F | elsif ($desc =~ /\b(int|integer)\b/i) { } |
| 50 | T | F | elsif ($desc =~ /\b(num|number|float)\b/i) { } |
| 50 | T | F | elsif ($desc =~ /\b(bool|boolean)\b/i) { } |
| 3696 | 100 | T | F | if ($desc =~ /\boptional\b/i) { } |
| 100 | T | F | elsif ($desc =~ /required|mandatory/i) { } |
| 3703 | 50 | T | F | if ($desc =~ m[matches?\s+(/[^/]+/|qr/.+?/)]i) |
| 3713 | 50 | T | F | if (exists $params{$param}) |
| 3715 | 100 | T | F | unless defined $params{$param}{'optional'} |
| 3718 | 100 | T | F | defined $pod_defaults->{$param} ? : |
| 3725 | 50 | T | F | if $name =~ /^(self|class)$/i |
| 3739 | 100 | T | F | if ($pod =~ /=head[34]\s+Input\b(.*?)(?==head|\z)/is) |
| 3743 | 100 | T | F | if ($block =~ /\A\[/) { } |
| 100 | T | F | elsif ($block =~ /\A\{/) { } |
| 3750 | 100 | T | F | if (defined $name) |
| 3752 | 50 | T | F | if (my $t = $self->_map_formal_input_type($spec)) |
| 3756 | 50 | T | F | if ($spec =~ /\boptional\s*=>\s*(0|1)/i) |
| 3766 | 100 | T | F | if $name =~ /^(self|class)$/i |
| 3769 | 50 | T | F | if (my $t = $self->_map_formal_input_type($spec)) |
| 3773 | 100 | T | F | if ($spec =~ /\boptional\s*=>\s*(0|1)/i) |
| 3776 | 50 | T | F | if ($spec =~ /\bmemberof\s*=>\s*\[([^\]]*)\]/i) |
| 3782 | 0 | T | F | if @vals |
| 3784 | 100 | T | F | if ($spec =~ /\bmin\s*=>\s*(\d+)/i) |
| 3787 | 100 | T | F | if ($spec =~ /\bmax\s*=>\s*(\d+)/i) |
| 3790 | 50 | T | F | if ($spec =~ /\bisa\s*=>\s*['"]([^'"]+)['"]/i) |
| 3825 | 100 | T | F | unless $spec =~ /\btype\s*=>\s*(?:['"]([^'"]+)['"]|([A-Z_]+))/i |
| 3826 | 100 | T | F | defined $1 ? : |
| 3852 | 100 | T | F | if exists $map{$t} |
| 3896 | 100 | T | F | if keys %output |
| 3899 | 100 | T | F | keys %output ? : |
| 3930 | 100 | T | F | if ($pod) |
| 3936 | 100 | T | F | if ($pod =~ /=head4\s+Output\b(.*?)(?==head|\z)/is) |
| 3939 | 100 | T | F | if ($block =~ /^\(/) { } |
| 50 | T | F | elsif ($block =~ /^\[/) { } |
| 100 | T | F | elsif ($block =~ /^\{/) { } |
| 3943 | 0 | T | F | unless ($block =~ /^\[\s*\]/) |
| 3948 | 50 | T | F | if ($block =~ /type\s*=>\s*['"]?(\w[\w:]*?)['"]?\s*[,}]/i) { } |
| 0 | T | F | elsif ($block =~ /\bisa\s*=>/) { } |
| 3950 | 50 | T | F | if $type eq "hash" |
| 3951 | 50 | T | F | if $type eq "array" |
| 3952 | 100 | T | F | if ($VALID_OUTPUT_TYPES{$type}) { } |
| 50 | T | F | elsif ($block =~ /\bisa\s*=>/) { } |
| 3968 | 100 | T | F | if ($pod =~ /Returns?:\s+([^\n]+(?:\n[^\n]+){0,2})/is) |
| 3975 | 100 | T | F | if (not $output->{'type'} and $returns_desc =~ /\b(string|text)\b/i) { } |
| 100 | T | F | elsif (not $output->{'type'} and $returns_desc =~ /\b(integer|int|count)\b/i) { } |
| 50 | T | F | elsif (not $output->{'type'} and $returns_desc =~ /\b(float|decimal|number)\b/i) { } |
| 100 | T | F | elsif (not $output->{'type'} and $returns_desc =~ /\b(boolean|true|false)\b/i) { } |
| 50 | T | F | elsif (not $output->{'type'} and $returns_desc =~ /\b(array|list)\b/i) { } |
| 50 | T | F | elsif (not $output->{'type'} and $returns_desc =~ /\b(hash|hashref|dictionary)\b/i) { } |
| 100 | T | F | elsif (not $output->{'type'} and $returns_desc =~ /\b(object|instance)\b/i) { } |
| 50 | T | F | elsif (not $output->{'type'} and $returns_desc =~ /\bundef\b/i) { } |
| 3994 | 100 | T | F | if ($returns_desc =~ /\b1\s+(?:on\s+success|if\s+successful)\b/i) { } |
| 50 | T | F | elsif ($returns_desc =~ /\b0\s+(?:on\s+failure|if\s+fail)\b/i) { } |
| 50 | T | F | elsif ($returns_desc =~ /dies\s+on\s+(?:error|failure)/i) { } |
| 3996 | 50 | T | F | if (defined $output->{'type'} and $output->{'type'} eq 'scalar') { } |
| 4008 | 100 | T | F | if ($returns_desc =~ /\b(true|false)\b/i) |
| 4011 | 50 | T | F | if ($returns_desc =~ /\bundef\b/i) |
| 4017 | 100 | T | F | if (not $output->{'type'} and $pod =~ /returns?\s+(?:an?\s+)?(\w+)/i) |
| 4020 | 100 | T | F | if $type =~ /^(true|false|bool)$/ |
| 4022 | 50 | T | F | if $type eq "int" |
| 4023 | 50 | T | F | if $type =~ /^(num|float)$/ |
| 4024 | 50 | T | F | if $type eq "array" |
| 4025 | 50 | T | F | if $type eq "hash" |
| 4027 | 100 | T | F | if ($type =~ /^\d+$/) |
| 4028 | 50 | T | F | if ($type eq '1' or $type eq '0') { } |
| 4030 | 50 | T | F | if ($pod =~ /1 on success.+0 (on|if) /i) { } |
| 50 | T | F | elsif ($pod =~ /return 0 .+ 1 on success/) { } |
| 4042 | 50 | T | F | if not $type and $pod =~ /returns?\s+.+\slist\b/i |
| 4044 | 100 | T | F | if ($VALID_OUTPUT_TYPES{$type}) { } |
| 4082 | 100 | T | F | unless $pod |
| 4095 | 50 | T | F | if @param_matches |
| 4097 | 50 | T | F | if ($param) |
| 4099 | 50 | T | F | if ($default_text =~ /(\w+)\s*=\s*(.+)$/) { } |
| 4119 | 50 | T | F | if (@param_matches) |
| 4157 | 50 | T | F | if ($code) |
| 4160 | 100 | T | F | if (@all_returns) |
| 4167 | 100 | T | F | if $ret =~ /^(?:0|1)(?:\s|$)/ |
| 4171 | 100 | T | F | if ($boolean_count >= 2 and $boolean_count >= $total_count * "0.8") |
| 4172 | 50 | T | F | unless ($output->{'type'}) |
| 4181 | 100 | T | F | if ($code =~ /return\s+bless\s*\{[^}]*\}\s*,\s*['"]?(\w+)['"]?/s) { } |
| 100 | T | F | elsif ($code =~ /return\s+bless/s) { } |
| 100 | T | F | elsif ($code =~ /return\s*\(\s*[^)]+\s*,\s*[^)]+\s*\)\s*;/) { } |
| 50 | T | F | elsif ($code =~ /return\s+bless[^,]+,\s*__PACKAGE__/) { } |
| 100 | T | F | elsif ($code =~ /return\s*\(([^)]+)\)/) { } |
| 100 | T | F | elsif ($code =~ /return\s+\$self\s*;/ and $code =~ /\$self\s*->\s*\{[^}]+\}\s*=/) { } |
| 4184 | 50 | T | F | if ($method_name eq 'new') { } |
| 4186 | 0 | T | F | if ($self->{'_document'} and my $package_stmt = $self->{'_document'}->find_first("PPI::Statement::Package")) |
| 4196 | 100 | T | F | if ($method_name eq 'new') { } |
| 4210 | 0 | T | F | if ($self->{'_document'}) |
| 4212 | 0 | T | F | $pkg ? : |
| 4218 | 50 | T | F | if ($content =~ /,/) |
| 4224 | 50 | T | F | if ($self->{'_document'}) |
| 4226 | 50 | T | F | $pkg ? : |
| 4238 | 100 | T | F | if (@return_statements) { } |
| 4244 | 100 | T | F | if ($output->{'type'}) |
| 4252 | 100 | T | F | if ($ret eq '1' or $ret eq '0') { } |
| 100 | T | F | elsif ($ret =~ /^['"]/) { } |
| 100 | T | F | elsif ($ret =~ /^-?\d+$/) { } |
| 50 | T | F | elsif ($ret =~ /^-?\d+\.\d+$/) { } |
| 100 | T | F | elsif ($ret eq 'undef') { } |
| 50 | T | F | elsif ($ret =~ /^\[/) { } |
| 100 | T | F | elsif ($ret =~ /^\{/) { } |
| 100 | T | F | elsif ($ret =~ m[
# Numeric expressions (heuristic, medium confidence)
# Don't match ->
(?:
\+ | -\b | \* | / | %
| \+\+ | --
)
]x) { } |
| 50 | T | F | elsif ($ret =~ /\|\|\s*\d+\b/) { } |
| 50 | T | F | elsif ($ret =~ /^length[\s\(]/) { } |
| 50 | T | F | elsif ($ret =~ /^pos[\s\(]/) { } |
| 50 | T | F | elsif ($ret =~ /^index[\s\(]/) { } |
| 50 | T | F | elsif ($ret =~ /^rindex[\s\(]/) { } |
| 50 | T | F | elsif ($ret =~ /^ord[\s\(]/) { } |
| 100 | T | F | elsif ($ret =~ /=/ and $ret =~ /\$\w+/) { } |
| 100 | T | F | elsif ($ret =~ /\$\w+/) { } |
| 4297 | 50 | T | F | if ($ret =~ /\b\d+\b/) { } |
| 4306 | 50 | T | F | if ($ret =~ /\\\@/) { } |
| 50 | T | F | elsif ($ret =~ /\\\%/) { } |
| 100 | T | F | elsif ($ret =~ /bless/) { } |
| 50 | T | F | elsif ($ret =~ /^\{[^}]*\}$/) { } |
| 50 | T | F | elsif ($ret =~ /^\[[^\]]*\]$/) { } |
| 4323 | 100 | T | F | if (keys %return_types) |
| 4326 | 100 | T | F | if ($return_types{'integer'} and not $return_types{'string'}) |
| 4327 | 100 | T | F | if (not $output->{'type'} or $output->{'type'} eq "scalar") |
| 4331 | 50 | T | F | if (defined $min) |
| 4336 | 100 | T | F | unless ($output->{'type'}) |
| 4340 | 100 | T | F | if ($most_common eq "number") |
| 4342 | 50 | T | F | if (defined $min) |
| 4352 | 100 | T | F | if (@return_statements == 1 and $return_statements[0] eq 1) |
| 4354 | 50 | T | F | if not $output->{'type'} or $output->{'type'} eq "scalar" |
| 4355 | 50 | T | F | if $output->{'type'} |
| 4396 | 100 | T | F | unless not $output->{'type'} or $output->{'type'} eq "unknown" |
| 4399 | 100 | T | F | if ($pod and not $output->{'type'}) |
| 4401 | 50 | T | F | if ($pod =~ /returns?\s+(?:true|false|1|0)\s+(?:on|for|upon)\s+(?:success|failure|error|valid|invalid)/i) |
| 4407 | 50 | T | F | if ($pod =~ /(?:method|sub)\s+(\w+)/) |
| 4409 | 0 | T | F | if ($inferred_method_name =~ /^(is_|has_|can_|should_|contains_|exists_)/) |
| 4417 | 50 | T | F | if ($code) |
| 4422 | 50 | T | F | if ($true_returns + $false_returns >= 2) { } |
| 100 | T | F | elsif ($true_returns + $false_returns == 1) { } |
| 4431 | 50 | T | F | if ($code =~ /return\s+(?:\w+\s*[!=]=\s*\w+|\w+\s*>\s*\w+|\w+\s*<\s*\w+)\s*\?\s*(?:1|0)\s*:\s*(?:1|0)/) |
| 4437 | 50 | T | F | if ($code =~ /return\s+[!\$\@\%]/) |
| 4445 | 50 | T | F | if ($method_name) |
| 4446 | 100 | T | F | if ($method_name =~ /^(?:is_|has_|can_|should_|contains_|exists_|check_|verify_|validate_)/) |
| 4450 | 50 | T | F | if ($method_name =~ /_ok$/) |
| 4458 | 100 | T | F | if ($boolean_score >= $BOOLEAN_SCORE_THRESHOLD) |
| 4459 | 50 | T | F | if (not $output->{'type'} or $output->{'type'} eq "scalar" or $output->{'type'} eq "array" or $output->{'type'} eq "undef") |
| 4489 | 50 | T | F | unless $code |
| 4492 | 100 | T | F | if ($code =~ /wantarray/) |
| 4497 | 100 | T | F | if ($code =~ /(wantarray[^;]+;)/s) |
| 4501 | 100 | T | F | if ($code =~ /wantarray\s*\?\s*\(([^)]+)\)\s*:\s*([^;]+)/s) { } |
| 100 | T | F | elsif ($code =~ /wantarray\s*\?\s*([^:]+?)\s*:\s*([^;]+)/s) { } |
| 50 | T | F | elsif ($code =~ /return[^;]*unless\s+wantarray.*?return\s*\(([^)]+)\)/s) { } |
| 4530 | 100 | T | F | if ($code =~ /return\s*\(\s*([^)]+)\s*\)\s*;/) |
| 4539 | 100 | T | F | if (substr($rest, 0, 1) =~ /[(\[{]/) |
| 4541 | 50 | T | F | unless defined $extracted |
| 4544 | 100 | T | F | if substr($rest, 0, 1) eq "," |
| 4548 | 100 | T | F | if ($comma_count > 0 and not $content =~ /\b(?:bless|new)\b/) |
| 4550 | 50 | T | F | unless ($output->{'type'} and $output->{'type'} eq "boolean") |
| 4583 | 50 | T | F | unless $code |
| 4597 | 100 | T | F | if ($method_name =~ /$void_patterns->{$type}/) |
| 4617 | 100 | T | F | if $ret eq "" |
| 4618 | 100 | T | F | if $ret =~ /^(if|unless)\s/ |
| 4619 | 100 | T | F | if $ret eq 1 |
| 4620 | 100 | T | F | if $ret eq "\$self" |
| 4621 | 100 | T | F | if ($ret =~ /\?\s*1\s*:\s*0\b/) |
| 4634 | 100 | T | F | if ($no_value_returns > 0 and $no_value_returns == $total_returns) { } |
| 100 | T | F | elsif ($true_returns > 0 and $true_returns == $total_returns and $total_returns >= 1) { } |
| 4642 | 100 | T | F | unless ($output->{'type'} and $output->{'type'} eq "boolean") |
| 4672 | 50 | T | F | unless $code |
| 4682 | 100 | T | F | if $ret eq "\$self" |
| 4686 | 100 | T | F | if ($self_returns > 0 and $total_returns > 0) |
| 4689 | 100 | T | F | if ($ratio >= "0.8") |
| 4694 | 100 | T | F | if ($self->{'_document'}) |
| 4696 | 50 | T | F | $pkg ? : |
| 4730 | 50 | T | F | unless $code |
| 4749 | 100 | T | F | if ($code =~ /return\s*\(\s*\)\s*(?:if|unless|;)/) |
| 4759 | 100 | T | F | if ($1 eq '0') { } |
| 4766 | 100 | T | F | if ($zero_returns > 0 and $one_returns > 0) |
| 4772 | 100 | T | F | if ($code =~ /eval\s*\{/) |
| 4774 | 50 | T | F | if ($code =~ /eval\s*\{.*?\}[^}]*(?:if\s*\(\s*\$\@|catch|return\s+undef)/s) |
| 4785 | 50 | T | F | if ($has_undef and $has_value and scalar @all_returns >= 2) |
| 4791 | 100 | T | F | if (scalar keys %error_patterns) { } |
| 4795 | 100 | T | F | if ($error_patterns{'undef_on_error'}) { } |
| 100 | T | F | elsif ($error_patterns{'implicit_undef'}) { } |
| 100 | T | F | elsif ($error_patterns{'empty_list'}) { } |
| 100 | T | F | elsif ($error_patterns{'zero_on_error'}) { } |
| 4809 | 100 | T | F | if ($error_patterns{'exception_handling'}) |
| 4841 | 100 | T | F | unless defined $expr |
| 4846 | 100 | T | F | if ($expr =~ /,/) |
| 4851 | 100 | T | F | if (substr($rest, 0, 1) =~ /[(\[{]/) |
| 4853 | 50 | T | F | unless defined $extracted |
| 4856 | 100 | T | F | if substr($rest, 0, 1) eq "," |
| 4860 | 100 | T | F | if ($comma_count > 0) |
| 4866 | 100 | T | F | if ($expr =~ /^\@\w+/ or $expr =~ /^qw\(/ or $expr =~ /^\@\{/) |
| 4871 | 100 | T | F | if ($expr =~ /scalar\s*\(/) |
| 4876 | 100 | T | F | if ($expr =~ /^\[/ or $expr =~ /^\\\@/) |
| 4881 | 100 | T | F | if ($expr =~ /^\{/ or $expr =~ /^\\\%/) |
| 4886 | 50 | T | F | if ($expr =~ /^\%\w+/ or $expr =~ /^\%\{/) |
| 4891 | 100 | T | F | if ($expr =~ /^['"]/ or $expr =~ /['"]$/) |
| 4897 | 100 | T | F | if ($expr =~ /^[01]$/) |
| 4902 | 100 | T | F | if ($expr =~ /^-?\d+$/) |
| 4906 | 100 | T | F | if ($expr =~ /^-?\d+\.\d+$/) |
| 4911 | 50 | T | F | if ($expr =~ /bless/) |
| 4915 | 100 | T | F | if ($expr =~ /\blength\s*\(/) |
| 4943 | 100 | T | F | unless $pod |
| 4946 | 100 | T | F | if ($pod =~ /returns?\s+(?:\$)?self\b/i or $pod =~ /chainable/i or $pod =~ /fluent\s+interface/i or $pod =~ /method\s+chaining/i) |
| 4978 | 100 | T | F | if (defined $output->{'type'} and $output->{'type'} eq "boolean" and not defined $output->{'value'}) |
| 4981 | 50 | T | F | if ($output->{'value'} and defined $output->{'type'} and $output->{'type'} ne "boolean") |
| 4985 | 100 | T | F | if (exists $output->{'type'}) |
| 4986 | 100 | T | F | if (not $valid_types{$output->{'type'}}) |
| 5018 | 100 | T | F | if ($constraint =~ /(\d+)\s*-\s*(\d+)/) { } |
| 100 | T | F | elsif ($constraint =~ /(\d+)\s*\.\.\s*(\d+)/) { } |
| 100 | T | F | elsif ($constraint =~ /(?:min|minimum|at least)\s*(\d+)/i) { } |
| 100 | T | F | elsif ($constraint =~ /(?:max|maximum|up to)\s*(\d+)/i) { } |
| 100 | T | F | elsif ($constraint =~ /positive/i) { } |
| 100 | T | F | elsif ($constraint =~ /non-negative/i) { } |
| 100 | T | F | elsif ($constraint =~ /^(\S+)\s+(.+)$/) { } |
| 5037 | 100 | T | F | if $param->{'type'} and $param->{'type'} eq "integer" |
| 5038 | 100 | T | F | if $param->{'type'} and $param->{'type'} eq "number" |
| 5045 | 50 | T | F | if (&looks_like_number($val)) |
| 5046 | 0 | T | F | if ($op eq '<') { } |
| 0 | T | F | elsif ($op eq '<=') { } |
| 0 | T | F | elsif ($op eq '>') { } |
| 0 | T | F | elsif ($op eq '>=') { } |
| 5058 | 100 | T | F | if (defined $param->{'max'}) |
| 5061 | 100 | T | F | if (defined $param->{'min'}) |
| 5109 | 100 | T | F | if ($code =~ /Params::Get/) |
| 5113 | 50 | T | F | if $name =~ /^(self|class)$/i |
| 5123 | 100 | T | F | if ($params{$param}{'_default'} and not $params{$param}{'type'}) |
| 5125 | 100 | T | F | if (ref $default eq 'HASH') { } |
| 100 | T | F | elsif (ref $default eq 'ARRAY') { } |
| 5135 | 50 | T | F | if ($code =~ /(?:croak|die)\(.*\)\s+if\s*\(\s*scalar\(\@_\)\s*<\s*(\d+)\s*\)/s) { } |
| 50 | T | F | elsif ($code =~ /(?:croak|die)\(.*\)\s+if\s*\(\s*scalar\(\@_\)\s*==\s*0\s*\)/s) { } |
| 5151 | 50 | T | F | if ($param_count++ > $self->{'max_parameters'}) |
| 5164 | 100 | T | F | if ($code =~ /defined\s*\(\s*\$$param\s*\)/) |
| 5170 | 100 | T | F | if ($code =~ m[\s*\$$param\s*(?://|\|\|)=]) { } |
| 100 | T | F | elsif ($code =~ m[\s*\$$param\s*(?:[\+\-\*\%]|/(?!/)|(?:\+\+)|(?:--)|(?:[\+\-\*\%]=|/(?!/)=)|\+\$|\$[+-])]) { } |
| 50 | T | F | elsif ($code =~ /\$\b$param\b\s*(?:\+0|\*1)/) { } |
| 5190 | 50 | T | F | if ($code =~ /if\s*\(\s*!\s*defined\s*\(\s*\$$param\s*\)\s*\)\s*\{([^}]+)\}/s) |
| 5192 | 0 | T | F | if ($block =~ /\b(croak|die|confess)\b/) |
| 5199 | 50 | T | F | if ($code =~ /\b(croak|die|confess)\b[^;]*\bunless\s+defined\s*\(\s*\$$param\s*\)/) |
| 5205 | 50 | T | F | if ($code =~ /exists\s*\(\s*\$$param\s*\)/) |
| 5211 | 50 | T | F | if ($code =~ /scalar\s*\(\s*\@?\$$param\s*\)/) |
| 5248 | 100 | T | F | if ($code =~ /ref\s*\(\s*\$$param\s*\)\s*eq\s*['"](ARRAY|HASH|SCALAR)['"]/gi) { } |
| 100 | T | F | elsif ($code =~ /\$$param\s*->\s*isa\s*\(\s*['"]([^'"]+)['"]\s*\)/i) { } |
| 100 | T | F | elsif ($code =~ /bless\s+.*\$$param/) { } |
| 5250 | 50 | T | F | $reftype eq 'hash' ? : |
| 100 | T | F | $reftype eq 'array' ? : |
| 5267 | 100 | T | F | unless ($p->{'type'}) |
| 5268 | 50 | T | F | if ($code =~ /\@\{\s*\$$param\s*\}/ or $code =~ /push\s*\(\s*\@?\$$param/) { } |
| 100 | T | F | elsif ($code =~ /\%\{\s*\$$param\s*\}/ or $code =~ /\$$param\s*->\s*\{/) { } |
| 5276 | 100 | T | F | if (not $p->{'type'} and exists $p->{'_default'}) |
| 5278 | 50 | T | F | if (ref $default eq 'HASH') { } |
| 50 | T | F | elsif (ref $default eq 'ARRAY') { } |
| 5290 | 100 | T | F | if (not $p->{'type'}) |
| 5297 | 100 | T | F | if ($code =~ /\blooks_like_number\s*\(\s*\$$param\s*\)/) { } |
| 100 | T | F | elsif ($code =~ m[\$$param\s*(?:[\+\-\*\%]|/(?!/))] or $code =~ m[(?:[\+\-\*\%]|/(?!/))\s*\$$param] or $code =~ /\bint\s*\(\s*\$$param\s*\)/ or $code =~ /\babs\s*\(\s*\$$param\s*\)/) { } |
| 100 | T | F | elsif ($code =~ /\$$param\s*(?:==|!=|<=|>=|<|>)/ or $code =~ /(?:==|!=|<=|>=|<|>)\s*\$$param/) { } |
| 5396 | 50 | T | F | unless defined $param and $param =~ /^\w+$/ |
| 5399 | 100 | T | F | if ($code =~ /\$$param\s*->\s*isa\s*\(\s*['"]DateTime['"]\s*\)/i) |
| 5408 | 100 | T | F | if ($code =~ /\$$param\s*->\s*(ymd|dmy|mdy|hms|iso8601|epoch|strftime)/) |
| 5417 | 50 | T | F | if ($code =~ /\$$param\s*->\s*isa\s*\(\s*['"]Time::Piece['"]\s*\)/i or $code =~ /\$$param\s*->\s*(strftime|epoch|year|mon|mday)/) |
| 5427 | 100 | T | F | if ($code =~ m[\$$param\s*=~\s*/.*?\\d\{4\}.*?\\d\{2\}.*?\\d\{2\}]) |
| 5436 | 100 | T | F | if ($code =~ m[\$$param\s*=~\s*/.*?[Tt].*?[Zz].*?/]) |
| 5445 | 50 | T | F | if ($code =~ /\$$param\s*>\s*\d{9,}/ or $code =~ /time\(\s*\)\s*-\s*\$$param/ or $code =~ /\$$param\s*-\s*time\(\s*\)/) |
| 5456 | 50 | T | F | if ($code =~ /strptime\s*\(\s*\$$param/ or $code =~ /DateTime::Format::\w+\s*->\s*parse_datetime\s*\(\s*\$$param/) |
| 5489 | 50 | T | F | unless defined $param and $param =~ /^\w+$/ |
| 5492 | 100 | T | F | if ($code =~ /(?:open|close|read|print|say|sysread|syswrite)\s*\(?\s*\$$param/) |
| 5501 | 100 | T | F | if ($code =~ /\$$param\s*->\s*(readline|getline|print|say|close|flush|autoflush)/) |
| 5510 | 100 | T | F | if ($code =~ /(?:-[frwxoOeszlpSbctugkTBMAC])\s+\$$param/) |
| 5518 | 50 | T | F | if ($code =~ /File::(?:Spec|Basename)::\w+\s*\(\s*\$$param/ or $code =~ /(?:basename|dirname|fileparse)\s*\(\s*\$$param/) |
| 5528 | 50 | T | F | if (defined $p->{'_default'} and $p->{'_default'} =~ m[^([A-Za-z]:\\|/|\./|\.\./)]) |
| 5536 | 50 | T | F | if ($code =~ /\$$param\s*->\s*isa\s*\(\s*['"]IO::File['"]\s*\)/ or $code =~ /IO::File\s*->\s*new\s*\(\s*\$$param/) |
| 5569 | 50 | T | F | unless defined $param and $param =~ /^\w+$/ |
| 5572 | 100 | T | F | if ($code =~ /ref\s*\(\s*\$$param\s*\)\s*eq\s*['"]CODE['"]/i) |
| 5580 | 50 | T | F | if ($code =~ /\$$param\s*->\s*\(/ or $code =~ /\$$param\s*->\s*\(\s*\@_\s*\)/ or $code =~ /&\s*\{\s*\$$param\s*\}/) |
| 5590 | 100 | T | F | if ($param =~ /^(?:callback|cb|handler|sub|code|fn|func|on_\w+)$/i) |
| 5598 | 50 | T | F | if ($code =~ /blessed\s*\(\s*\$$param\s*\)/ and $code =~ /ref\s*\(\s*\$$param\s*\)\s*eq\s*['"]CODE['"]/i) |
| 5637 | 50 | T | F | unless defined $param and $param =~ /^\w+$/ |
| 5641 | 100 | T | F | if ($code =~ m[unless\s+\$$param\s*=~\s*/\^?\(([^)]+)\)]) |
| 5644 | 100 | T | F | unless $p->{'type'} |
| 5654 | 100 | T | F | if ($code =~ /\%(\w+)\s*=.*?qw\s*[\(\[<{]([^)\]>}]+)[\)\]>}]/) |
| 5657 | 100 | T | F | if (defined $values_str and $code =~ /\$$hash_name\s*\{\s*\$$param\s*\}/) |
| 5659 | 50 | T | F | unless $p->{'type'} |
| 5669 | 100 | T | F | if ($code =~ /grep\s*\{[^}]*\$${param}[^}]*\}\s*qw\s*[\(\[<{]([^)\]>}]+)[\)\]>}]/) |
| 5672 | 50 | T | F | unless $p->{'type'} |
| 5680 | 100 | T | F | if ($code =~ /given\s*\(\s*\$$param\s*\)/) |
| 5685 | 50 | T | F | if (@enum_values >= 2) |
| 5686 | 50 | T | F | unless $p->{'type'} |
| 5703 | 100 | T | F | if (@if_values >= 3) |
| 5704 | 50 | T | F | unless $p->{'type'} |
| 5713 | 50 | T | F | if ($code =~ /\$$param\s*~~\s*\[([^\]]+)\]/ or $code =~ /\$$param\s*~~\s*qw\s*[\(\[<{]([^)\]>}]+)[\)\]>}]/) |
| 5717 | 0 | T | F | if ($values_str =~ /['"]/) { } |
| 5722 | 0 | T | F | if (@enum_values) |
| 5723 | 0 | T | F | unless $p->{'type'} |
| 5776 | 100 | T | F | unless $condition =~ /\$$param\b/ |
| 5793 | 100 | T | F | if ($condition =~ /\$$param\s*([!<>=]=?|eq|ne|lt|gt|le|ge)\s*(.+)/) { } |
| 100 | T | F | elsif ($condition =~ /length\s*\(\s*\$$param\s*\)\s*([<>=!]+)\s*(\d+)/) { } |
| 50 | T | F | elsif ($condition =~ /\$$param\s*==\s*0/) { } |
| 5804 | 100 | T | F | if $constraint |
| 5805 | 100 | T | F | if defined $message |
| 5807 | 100 | T | F | defined $message ? : |
| 5814 | 100 | T | F | if ($code =~ /\b\Q$param\E\s*(<=|<|>=|>)\s*(-?\d+)/) |
| 5820 | 100 | T | F | if ($op eq '<=') { } |
| 100 | T | F | elsif ($op eq '<') { } |
| 100 | T | F | elsif ($op eq '>=') { } |
| 50 | T | F | elsif ($op eq '>') { } |
| 5874 | 100 | T | F | if ($code =~ /sub\s+\w+\s*(?::\w+(?:\([^)]*\))?\s*)*\(((?:[^()]|\([^)]*\))*)\)\s*\{/s) |
| 5878 | 100 | T | F | if ($potential_sig =~ /[\$\%\@]/) |
| 5888 | 100 | T | F | if ($code =~ /my\s+\$(?:self|class)\s*=\s*\$_\[0\]/) |
| 5892 | 100 | T | F | if $name =~ /^(self|class)$/i |
| 5900 | 100 | T | F | if ($code =~ /my\s*\(\s*([^)]+)\)\s*=\s*\@_/s) { } |
| 100 | T | F | elsif ($code =~ /my\s+\$self\s*=\s*shift/) { } |
| 5907 | 100 | T | F | if $name =~ /^(self|class)$/i |
| 5914 | 50 | T | F | unless exists $params->{$name}{'position'} |
| 5925 | 50 | T | F | if @shifts and $shifts[0] =~ /^(self|class)$/i |
| 5934 | 50 | T | F | if ($code =~ /my\s*\(\s*([^)]+)\)\s*=\s*\@_/s) |
| 5939 | 0 | T | F | if $param =~ /^(self|class)$/i |
| 5947 | 0 | T | F | if ($seen{$param}++) |
| 5985 | 100 | T | F | if (substr($rest, 0, 1) =~ /[(\[{]/) |
| 5989 | 50 | T | F | unless defined $extracted |
| 5993 | 100 | T | F | if (substr($rest, 0, 1) eq ",") |
| 6002 | 50 | T | F | if $current =~ /\S/ |
| 6010 | 50 | T | F | unless $part |
| 6015 | 50 | T | F | if ($param_info) |
| 6019 | 100 | T | F | if ($name =~ /^(self|class)$/i) |
| 6026 | 100 | T | F | $param_info->{'optional'} ? : |
| 100 | T | F | $param_info->{'_default'} ? : |
| 6071 | 100 | T | F | if ($part =~ /^\$(\w+)\s*:\s*(\w+)\s*=\s*(.+)$/s) { } |
| 100 | T | F | elsif ($part =~ /^\$(\w+)\s*:\s*(\w+)\s*$/s) { } |
| 100 | T | F | elsif ($part =~ /^\$(\w+)\s*=\s*(.+)$/s) { } |
| 100 | T | F | elsif ($part =~ /^\$(\w+)$/s) { } |
| 100 | T | F | elsif ($part =~ /^\@(\w+)$/s) { } |
| 100 | T | F | elsif ($part =~ /^\%(\w+)$/s) { } |
| 6080 | 100 | T | F | if ($constraint =~ /^(Int|Integer)$/i) { } |
| 100 | T | F | elsif ($constraint =~ /^(Num|Number)$/i) { } |
| 50 | T | F | elsif ($constraint =~ /^(Str|String)$/i) { } |
| 0 | T | F | elsif ($constraint =~ /^(Bool|Boolean)$/i) { } |
| 0 | T | F | elsif ($constraint =~ /^(Array|ArrayRef)$/i) { } |
| 0 | T | F | elsif ($constraint =~ /^(Hash|HashRef)$/i) { } |
| 6105 | 100 | T | F | if ($constraint =~ /^(Int|Integer)$/i) { } |
| 100 | T | F | elsif ($constraint =~ /^(Num|Number)$/i) { } |
| 100 | T | F | elsif ($constraint =~ /^(Str|String)$/i) { } |
| 100 | T | F | elsif ($constraint =~ /^(Bool|Boolean)$/i) { } |
| 100 | T | F | elsif ($constraint =~ /^(Array|ArrayRef)$/i) { } |
| 50 | T | F | elsif ($constraint =~ /^(Hash|HashRef)$/i) { } |
| 6131 | 50 | T | F | if $self->can("_infer_type_from_default") |
| 6185 | 100 | T | F | unless defined $default |
| 6187 | 100 | T | F | if (ref $default eq 'HASH') { } |
| 100 | T | F | elsif (ref $default eq 'ARRAY') { } |
| 100 | T | F | elsif ($default =~ /^-?\d+$/) { } |
| 100 | T | F | elsif ($default =~ /^-?\d+\.\d+$/) { } |
| 50 | T | F | elsif ($default eq '1' or $default eq '0') { } |
| 6234 | 100 | T | F | if ($code =~ /sub\s+\w+\s+((?::\w+(?:\([^)]*\))?\s*)+)/s) |
| 6239 | 100 | T | F | if ($attr_section) |
| 6243 | 100 | T | F | if (defined $value and $value ne '') { } |
| 6254 | 100 | T | F | if ($attributes{'Returns'}) |
| 6256 | 50 | T | F | if ($return_type ne 1) |
| 6261 | 100 | T | F | if ($attributes{'lvalue'}) |
| 6265 | 100 | T | F | if ($attributes{'method'}) |
| 6299 | 100 | T | F | if ($code =~ /\$\w+\s*->\s*\@\*/) |
| 6305 | 100 | T | F | if ($code =~ /\$\w+\s*->\s*\%\*/) |
| 6311 | 100 | T | F | if ($code =~ /\$\w+\s*->\s*\$\*/) |
| 6317 | 100 | T | F | if ($code =~ /\$\w+\s*->\s*\&\*/) |
| 6323 | 100 | T | F | if ($code =~ /\$\w+\s*->\s*\@\[/) |
| 6329 | 100 | T | F | if ($code =~ /\$\w+\s*->\s*\%\{/) |
| 6378 | 100 | T | F | if ($modifiers =~ /:param(?:\(([^)]+)\))?/) |
| 6381 | 100 | T | F | if (defined $1) { } |
| 6393 | 100 | T | F | if ($modifiers =~ /=\s*([^:;]+)(?::|;|$)/) |
| 6398 | 50 | T | F | defined $field_info{'_default'} ? : |
| 6402 | 100 | T | F | if ($modifiers =~ /:isa\(([^)]+)\)/) |
| 6449 | 100 | T | F | unless $field->{'is_param'} |
| 6458 | 50 | T | F | unless $p->{'_source'} |
| 6459 | 100 | T | F | if $field_name ne $param_name |
| 6461 | 100 | T | F | if ($field->{'_default'}) |
| 6466 | 100 | T | F | if ($field->{'isa'}) |
| 6511 | 100 | T | F | unless exists $params->{$param} |
| 6512 | 50 | T | F | if $value =~ /->/ |
| 6522 | 50 | T | F | unless exists $params->{$param} |
| 6532 | 50 | T | F | unless exists $params->{$param} |
| 6542 | 50 | T | F | unless exists $params->{$param} |
| 6552 | 50 | T | F | unless exists $params->{$param} |
| 6562 | 100 | T | F | unless exists $params->{$param} |
| 6587 | 0 | T | F | unless exists $params->{$param} |
| 6597 | 50 | T | F | unless exists $params->{$param} |
| 6611 | 100 | T | F | if (not keys %{$params;} || $code =~ /my\s+\$(?:self|class)\s*=\s*\$_\[0\]/) |
| 6618 | 100 | T | F | if ($var eq 'class' and $position == 0 and $method->{'name'} eq 'new') { } |
| 50 | T | F | elsif ($var eq 'self' and $position == 0 and $method->{'name'} ne 'new') { } |
| 6634 | 100 | T | F | if ($var eq 'class' and $position == 0 and $method->{'name'} eq 'new') { } |
| 100 | T | F | elsif ($var eq 'self' and $position == 0 and $method->{'name'} ne 'new') { } |
| 6649 | 0 | T | F | if ($var ne "class" or $position > 0 or $method->{'name'} ne "new") |
| 6677 | 100 | T | F | unless defined $default |
| 6678 | 100 | T | F | if ref $default |
| 6703 | 100 | T | F | if exists $self->{'_constants'} |
| 6707 | 50 | T | F | unless ($doc) |
| 6760 | 100 | T | F | if ($code =~ /(die|croak|confess)\b[^{;]*\bif\b[^{;]*\$$param\b/s) |
| 6765 | 100 | T | F | if ($code =~ /length\s*\(\s*\$$param\s*\)\s*([<>]=?)\s*(\d+)/) |
| 6768 | 100 | T | F | if ($op eq '<') { } |
| 50 | T | F | elsif ($op eq '<=') { } |
| 100 | T | F | elsif ($op eq '>') { } |
| 50 | T | F | elsif ($op eq '>=') { } |
| 6784 | 50 | T | F | unless defined $val |
| 6786 | 50 | T | F | if ($op eq '<') { } |
| 100 | T | F | elsif ($op eq '<=') { } |
| 50 | T | F | elsif ($op eq '>') { } |
| 50 | T | F | elsif ($op eq '>=') { } |
| 6799 | 100 | T | F | if (not $guarded and $code =~ /\$$param\s*([<>]=?)\s*([+-]?(?:\d+\.?\d*|\.\d+))/) |
| 6804 | 0 | T | F | &looks_like_number($val) ? : |
| 6806 | 100 | T | F | if ($op eq '<' or $op eq '<=') { } |
| 50 | T | F | elsif ($op eq '>' or $op eq '>=') { } |
| 6808 | 50 | T | F | $op eq '<' ? : |
| 6809 | 50 | T | F | if not defined $p->{'max'} or $max < $p->{'max'} |
| 6811 | 100 | T | F | $op eq '>' ? : |
| 6812 | 50 | T | F | if not defined $p->{'min'} or $min > $p->{'min'} |
| 6817 | 100 | T | F | if ($code =~ m[\$$param\s*=~\s*((?:qr?/[^/]+/|\$[\w:]+|\$\{\w+\}))]) |
| 6822 | 50 | T | F | if ($pattern =~ m[^qr?/([^/]+)/$]) { } |
| 6863 | 100 | T | F | if ($code =~ /(?:die|croak|confess)\s+[^;]*unless\s+(?:defined\s+)?\$$param/s) |
| 6869 | 100 | T | F | if (defined $default_value and not exists $p->{'_default'}) |
| 6874 | 50 | T | F | unless ($p->{'type'}) |
| 6875 | 50 | T | F | if (&looks_like_number($default_value)) { } |
| 0 | T | F | elsif (ref $default_value eq 'ARRAY') { } |
| 0 | T | F | elsif (ref $default_value eq 'HASH') { } |
| 0 | T | F | elsif ($default_value eq 'undef') { } |
| 0 | T | F | elsif (defined $default_value and not ref $default_value) { } |
| 6876 | 50 | T | F | $default_value =~ /\./ ? : |
| 6888 | 50 | T | F | ref $default_value ? : |
| 6893 | 100 | T | F | if (not $default_value || exists $p->{'_default'} and $code =~ /\$$param\s*=\s*([^;{}]+?)(?:\s*[;}])/s) |
| 6896 | 100 | T | F | unless ($assignment =~ /\$$param/ or $assignment =~ /^shift/) |
| 6900 | 50 | T | F | if (defined $possible_default) |
| 6909 | 100 | T | F | if ($is_required) |
| 6911 | 100 | T | F | if exists $p->{'_default'} |
| 6963 | 100 | T | F | if $pod->{$param} and defined $pod->{$param}{'position'} |
| 6964 | 50 | T | F | if $sig->{$param} and defined $sig->{$param}{'position'} |
| 6965 | 100 | T | F | if $code->{$param} and defined $code->{$param}{'position'} |
| 6968 | 100 | T | F | if (@positions) |
| 6971 | 0 | T | F | unless $pos_count{$b} <=> $pos_count{$a} |
| 6972 | 50 | T | F | unless exists $p->{'position'} |
| 6976 | 100 | T | F | if ($pod->{$param}) |
| 6981 | 100 | T | F | if ($code->{$param}) |
| 6983 | 100 | T | F | if $key eq "_source" |
| 6984 | 100 | T | F | if $key eq "position" |
| 6988 | 50 | T | F | if $key eq "type" and $pod->{$param} and $pod->{$param}{'_from_input_spec'} and not defined $pod->{$param}{'type'} |
| 6992 | 100 | T | F | if (not exists $p->{$key} or $key eq "type" and $from_pod and $p->{'type'} eq "string" and $code->{$param}{$key} ne "string") |
| 7001 | 50 | T | F | if ($sig->{$param}) |
| 7003 | 0 | T | F | if $key eq "_source" |
| 7004 | 0 | T | F | if $key eq "position" |
| 7017 | 100 | T | F | if ($self->{'verbose'}) |
| 7023 | 50 | T | F | defined $p->{'optional'} ? : |
| 7054 | 100 | T | F | $pod_param ? : |
| 7055 | 100 | T | F | $code_param ? : |
| 7058 | 100 | T | F | if (defined $pod_optional) { } |
| 100 | T | F | elsif (defined $code_optional) { } |
| 100 | T | F | elsif (keys %$merged_param > 0) { } |
| 7108 | 100 | T | F | unless keys %$params |
| 7120 | 100 | T | F | if ($p->{'type'}) { } |
| 7121 | 100 | T | F | if ($p->{'type'} eq 'string' and $p->{'min'} || $p->{'max'} || $p->{'matches'}) { } |
| 100 | T | F | elsif ($p->{'type'} eq 'string') { } |
| 7136 | 100 | T | F | if (defined $p->{'min'}) |
| 7140 | 100 | T | F | if (defined $p->{'max'}) |
| 7144 | 100 | T | F | if (defined $p->{'optional'}) |
| 7148 | 100 | T | F | if ($p->{'matches'}) |
| 7152 | 100 | T | F | if ($p->{'isa'}) |
| 7158 | 100 | T | F | if (defined $p->{'position'}) |
| 7164 | 100 | T | F | if (exists $p->{'_default'}) |
| 7170 | 100 | T | F | if ($p->{'semantic'}) |
| 7184 | 50 | T | F | $count ? : |
| 7187 | 100 | T | F | $count == 1 ? : |
| 7193 | 50 | T | F | if (@sorted_params) |
| 7198 | 100 | T | F | if (@sorted_params > 1) |
| 7207 | 100 | T | F | if ($avg >= $CONFIDENCE_HIGH_THRESHOLD) { } |
| 100 | T | F | elsif ($avg >= $CONFIDENCE_MEDIUM_THRESHOLD) { } |
| 100 | T | F | elsif ($avg >= $CONFIDENCE_LOW_THRESHOLD) { } |
| 7256 | 100 | T | F | unless keys %$output |
| 7261 | 100 | T | F | if ($output->{'type'}) { } |
| 7269 | 100 | T | F | if (defined $output->{'value'}) |
| 7275 | 100 | T | F | if ($output->{'isa'}) |
| 7281 | 100 | T | F | if ($output->{'_context_aware'}) |
| 7285 | 50 | T | F | if ($output->{'_list_context'}) |
| 7288 | 100 | T | F | if ($output->{'_scalar_context'}) |
| 7294 | 100 | T | F | if ($output->{'_error_return'}) |
| 7300 | 100 | T | F | if ($output->{'_success_failure_pattern'}) |
| 7306 | 100 | T | F | if ($output->{'_returns_self'}) |
| 7312 | 100 | T | F | if ($output->{'_void_context'}) |
| 7318 | 100 | T | F | if ($output->{'_error_handling'} and $output->{'_error_handling'}{'exception_handling'}) |
| 7327 | 100 | T | F | if ($score >= $CONFIDENCE_HIGH_THRESHOLD) { } |
| 100 | T | F | elsif ($score >= $CONFIDENCE_MEDIUM_THRESHOLD) { } |
| 100 | T | F | elsif ($score >= $CONFIDENCE_LOW_THRESHOLD) { } |
| 7369 | 100 | T | F | unless $schema->{'_analysis'} |
| 7381 | 50 | T | F | if ($analysis->{'confidence_factors'}{'input'}) |
| 7392 | 50 | T | F | if ($analysis->{'confidence_factors'}{'output'}) |
| 7401 | 50 | T | F | if ($analysis->{'per_parameter_scores'}) |
| 7442 | 100 | T | F | unless ($p->{'type'}) |
| 7446 | 100 | T | F | unless (defined $p->{'optional'}) |
| 7488 | 100 | T | F | unless ref $p eq "HASH" |
| 7489 | 100 | T | F | unless ($p->{'type'}) |
| 7540 | 100 | T | F | unless @param_names |
| 7588 | 100 | T | F | if ($rel->{'type'} eq 'mutually_exclusive') { } |
| 100 | T | F | elsif ($rel->{'type'} eq 'required_group') { } |
| 100 | T | F | elsif ($rel->{'type'} eq 'conditional_requirement') { } |
| 100 | T | F | elsif ($rel->{'type'} eq 'dependency') { } |
| 100 | T | F | elsif ($rel->{'type'} eq 'value_constraint') { } |
| 50 | T | F | elsif ($rel->{'type'} eq 'value_conditional') { } |
| 7604 | 100 | T | F | unless ($seen{$sig}++) |
| 7640 | 100 | T | F | if $param1 eq $param2 |
| 7643 | 100 | T | F | if ($code =~ /(?:die|croak|confess)[^;]*if\s+\$$param1\s+&&\s+\$$param2/ or $code =~ /(?:die|croak|confess)[^;]*if\s+\$$param2\s+&&\s+\$$param1/) |
| 7649 | 100 | T | F | if ($rel->{'type'} eq "mutually_exclusive" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1)) |
| 7656 | 100 | T | F | if $found_reverse |
| 7668 | 100 | T | F | if ($code =~ /(?:die|croak|confess)\s+['"](Cannot|Can't)[^'"]*both[^'"]*${param1}[^'"]*$param2/i or $code =~ /(?:die|croak|confess)\s+['"](Cannot|Can't)[^'"]*both[^'"]*${param2}[^'"]*$param1/i) |
| 7673 | 50 | T | F | if ($rel->{'type'} eq "mutually_exclusive" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1)) |
| 7680 | 50 | T | F | if $found_reverse |
| 7724 | 100 | T | F | if $param1 eq $param2 |
| 7726 | 100 | T | F | if ($code =~ /(?:die|croak|confess)[^;]*unless\s+\$$param1\s+\|\|\s+\$$param2/ or $code =~ /(?:die|croak|confess)[^;]*unless\s+\$$param2\s+\|\|\s+\$$param1/) |
| 7732 | 50 | T | F | if ($rel->{'type'} eq "required_group" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1)) |
| 7739 | 100 | T | F | if $found_reverse |
| 7752 | 100 | T | F | if ($code =~ /(?:die|croak|confess)\s+['"]Must\s+specify\s+either[^'"]*${param1}[^'"]*or[^'"]*$param2/i or $code =~ /(?:die|croak|confess)\s+['"]Must\s+specify\s+either[^'"]*${param2}[^'"]*or[^'"]*$param1/i) |
| 7757 | 50 | T | F | if ($rel->{'type'} eq "required_group" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1)) |
| 7764 | 50 | T | F | if $found_reverse |
| 7809 | 100 | T | F | if $param1 eq $param2 |
| 7812 | 100 | T | F | if ($code =~ /(?:die|croak|confess)[^;]*if\s+\$$param1\s+&&\s+!\$$param2/) |
| 7824 | 50 | T | F | if ($code =~ /(?:die|croak|confess)[^;]*if\s+\$$param1\s+&&\s+!defined\s*\(\s*\$$param2\s*\)/) |
| 7836 | 100 | T | F | if ($code =~ /(?:die|croak|confess)\s+['"]\w*${param1}[^'"]*requires[^'"]*$param2/i) |
| 7879 | 100 | T | F | if $param1 eq $param2 |
| 7883 | 100 | T | F | if ($code =~ /(?:die|croak|confess)\s+['"]\w*${param1}[^'"]*requires[^'"]*$param2/i and $code =~ /if\s+\$$param1\s+&&\s+!\$$param2/) |
| 7928 | 100 | T | F | if $param1 eq $param2 |
| 7931 | 100 | T | F | if ($code =~ /(?:die|croak|confess)[^;]*if\s+\$$param1\s+&&\s+\$$param2\s*!=\s*(\d+)/) |
| 7946 | 50 | T | F | if ($code =~ /(?:die|croak|confess)[^;]*if\s+\$$param1\s+&&\s+\$$param2\s*<\s*(\d+)/) |
| 7961 | 100 | T | F | if ($code =~ /(?:die|croak|confess)[^;]*if\s+\$$param1\s+eq\s+['"]([^'"]+)['"]\s+&&\s+!\$$param2/) |
| 7991 | 100 | T | F | unless defined $self->{'output_dir'} |
| 7993 | 100 | T | F | unless -d $self->{'output_dir'} |
| 8002 | 100 | T | F | if ($self->{'_document'}) |
| 8004 | 100 | T | F | $package_stmt ? : |
| 8024 | 100 | T | F | if ($schema->{'input'}) |
| 8025 | 100 | T | F | if (scalar keys %{$$schema{'input'};}) { } |
| 8030 | 100 | T | F | if ($param->{'name'}) |
| 8032 | 50 | T | F | if ($name ne $param_name) |
| 8048 | 50 | T | F | if (@with_pos and @without_pos) |
| 8057 | 50 | T | F | if ($schema->{'output'} and scalar keys %{$$schema{"output"};}) |
| 8058 | 100 | T | F | if (ref $schema->{'output'}{'_error_handling'} eq "HASH" and scalar keys %{$$schema{"output"}{"_error_handling"};} == 0) |
| 8064 | 50 | T | F | if ($schema->{'output'}{'type'} and $schema->{'output'}{'type'} eq "scalar") |
| 8070 | 100 | T | F | if ($schema->{'new'}) |
| 8072 | 100 | T | F | if (ref $schema->{'new'} or $schema->{'new'} eq $package_name) { } |
| 8073 | 50 | T | F | $schema->{'new'} eq $package_name ? : |
| 8081 | 100 | T | F | unless (defined $schema->{'_confidence'}{'input'}{'level'}) |
| 8084 | 100 | T | F | unless (defined $schema->{'_confidence'}{'output'}{'level'}) |
| 8089 | 100 | T | F | if ($schema->{'relationships'} and @{$schema->{'relationships'};}) |
| 8093 | 50 | T | F | if ($schema->{'accessor'} and scalar keys %{$$schema{"accessor"};}) |
| 8103 | 100 | T | F | $schema->{'relationships'} ? : |
| 8105 | 100 | T | F | $schema->{'new'} ? : |
| 8144 | 100 | T | F | if ($schema->{'input'}) |
| 8149 | 100 | T | F | if ($p->{'semantic'}) |
| 8153 | 100 | T | F | if ($p->{'enum'}) |
| 8157 | 100 | T | F | if ($p->{'isa'}) |
| 8162 | 100 | T | F | if (@param_notes) |
| 8172 | 100 | T | F | if ($schema->{'relationships'} and @{$schema->{'relationships'};}) |
| 8184 | 100 | T | F | if ($schema->{'_notes'} and scalar @{$schema->{'_notes'};}) |
| 8192 | 100 | T | F | if ($schema->{'_analysis'}) |
| 8212 | 100 | T | F | if ($schema->{'input'}) |
| 8216 | 100 | T | F | if ($p->{'type'} and $p->{'type'} eq "coderef") |
| 8220 | 100 | T | F | if ($p->{'semantic'} and $p->{'semantic'} eq "filehandle") |
| 8224 | 100 | T | F | if ($p->{'isa'} and $p->{'isa'} =~ /DateTime/) |
| 8230 | 100 | T | F | if (@warnings) |
| 8277 | 100 | T | F | if defined $param->{$field} |
| 8281 | 100 | T | F | if (my $semantic = $param->{'semantic'}) |
| 8282 | 100 | T | F | if ($semantic eq 'datetime_object') { } |
| 50 | T | F | elsif ($semantic eq 'timepiece_object') { } |
| 100 | T | F | elsif ($semantic eq 'date_string') { } |
| 100 | T | F | elsif ($semantic eq 'iso8601_string') { } |
| 100 | T | F | elsif ($semantic eq 'unix_timestamp') { } |
| 50 | T | F | elsif ($semantic eq 'datetime_parseable') { } |
| 100 | T | F | elsif ($semantic eq 'filehandle') { } |
| 100 | T | F | elsif ($semantic eq 'filepath') { } |
| 100 | T | F | elsif ($semantic eq 'callback') { } |
| 100 | T | F | elsif ($semantic eq 'enum') { } |
| 8325 | 50 | T | F | if ($param->{'enum'} and ref $param->{'enum'} eq "ARRAY") |
| 8335 | 100 | T | F | if ($param->{'enum'} and ref $param->{'enum'} eq "ARRAY" and not $cleaned{'enum'}) |
| 8338 | 50 | T | F | if ($param->{'memberof'} and ref $param->{'memberof'} eq "ARRAY") |
| 8343 | 100 | T | F | if ($param->{'isa'} and not $cleaned{'isa'}) |
| 8348 | 100 | T | F | if ($param->{'format'}) |
| 8380 | 100 | T | F | if ($rel->{'type'} eq 'mutually_exclusive') { } |
| 100 | T | F | elsif ($rel->{'type'} eq 'required_group') { } |
| 100 | T | F | elsif ($rel->{'type'} eq 'conditional_requirement') { } |
| 100 | T | F | elsif ($rel->{'type'} eq 'dependency') { } |
| 100 | T | F | elsif ($rel->{'type'} eq 'value_constraint') { } |
| 100 | T | F | elsif ($rel->{'type'} eq 'value_conditional') { } |
| 8433 | 50 | T | F | unless $doc |
| 8437 | 100 | T | F | $package_stmt ? : |
| 8453 | 100 | T | F | if ($method_name eq "new") |
| 8457 | 50 | T | F | if ($method_name =~ /^(create|build|construct|init|DESTROY)$/i) |
| 8468 | 100 | T | F | if ($is_singleton) |
| 8480 | 0 | T | F | if ($is_instance_method and $is_instance_method->{'explicit_self'} || $is_instance_method->{'shift_self'} || $is_instance_method->{'accesses_object_data'} || $is_instance_method->{'calls_instance_methods'} && scalar @{$is_instance_method->{'calls_instance_methods'};}) |
| 8488 | 100 | T | F | if ($is_factory) |
| 8502 | 50 | T | F | if ($inheritance_info and $inheritance_info->{'use_parent_constructor'}) |
| 8514 | 100 | T | F | if ($constructor_needs) |
| 8528 | 50 | T | F | if ($needs_other_object) |
| 8532 | 0 | T | F | if $needs_other_object->{'package'} |
| 8538 | 0 | T | F | if $result->{'package'} |
| 8542 | 100 | T | F | if ($is_factory and not $skip_object) |
| 8548 | 50 | T | F | if $is_factory->{'returns_class'} |
| 8584 | 100 | T | F | if ($method_name =~ /^(create_|make_|build_|get_)/i) |
| 8589 | 50 | T | F | if ($method_body) |
| 8591 | 100 | T | F | if ($method_body =~ /return\s+bless\s*\{[^}]*\},\s*['"]?(\w+(?:::\w+)*|\$\w+)['"]?/s or $method_body =~ /bless\s*\{[^}]*\},\s*['"]?(\w+(?:::\w+)*|\$\w+)['"]?.*return/s) |
| 8596 | 100 | T | F | if ($class_name =~ /^\$(class|self|package)$/) { } |
| 50 | T | F | elsif ($class_name =~ /^\$/) { } |
| 8610 | 100 | T | F | if ($method_body =~ /return\s+([\$\w:]+)->new\(/s or $method_body =~ /([\$\w:]+)->new\(.*return/s) |
| 8615 | 50 | T | F | if ($target eq '$self' or $target eq 'shift' or $target =~ /^\$/) { } |
| 100 | T | F | elsif ($target =~ /::/) { } |
| 8631 | 50 | T | F | if ($method_body =~ /return\s+([\$\w:]+)->(create_|make_|build_|get_)/i or $method_body =~ /([\$\w:]+)->(create_|make_|build_|get_).*return/is) |
| 8640 | 100 | T | F | if ($method_info and ref $method_info eq "HASH" and $method_info->{'pod'}) |
| 8642 | 50 | T | F | if ($pod =~ /returns?\s+(?:an?\s+)?(object|instance|new\s+\w+)/i) |
| 8682 | 100 | T | F | unless $method_name =~ /^(instance|get_instance|singleton|shared_instance)$/i |
| 8689 | 50 | T | F | if ($method_body) |
| 8691 | 100 | T | F | if ($method_body =~ /(?:my\s+)?(?:our\s+)?\$(?:instance|_instance|singleton)\b/s or $method_body =~ /state\s+\$(?:instance|_instance|singleton)\b/s) |
| 8698 | 100 | T | F | if ($method_body =~ /return\s+\$instance\s+if\s+(?:defined\s+)?\$instance/ or $method_body =~ /unless\s+\$instance.*?=\s*.*?new/) |
| 8705 | 100 | T | F | if ($method_body =~ /\$instance\s*\|\|=\s*.*?new/ or $method_body =~ /\$instance\s*=\s*.*?new\s+unless\s+(?:defined\s+)?\$instance/) |
| 8712 | 100 | T | F | if ($method_body =~ /return\s+\$instance;/) |
| 8714 | 50 | T | F | unless $singleton_info{'confidence'} |
| 8718 | 50 | T | F | if keys %singleton_info > 0 |
| 8753 | 100 | T | F | if ($method_body =~ /my\s*\(\s*\$self\s*[,)]/) { } |
| 100 | T | F | elsif ($method_body =~ /my\s+\$self\s*=\s*\$_\[0\]/) { } |
| 100 | T | F | elsif ($method_body =~ /my\s+\$self\s*=\s*shift/) { } |
| 100 | T | F | elsif ($method_body =~ /\$self\s*->\s*(\w+|[\{\[])/) { } |
| 8778 | 100 | T | F | if ($method_body =~ /\$self\s*->\s*[\{\[]/) |
| 8780 | 100 | T | F | unless $instance_info{'confidence'} eq "high" |
| 8784 | 100 | T | F | if ($method_body =~ /\$self\s*->\s*(\w+)\s*\(/s) |
| 8789 | 50 | T | F | if @{$instance_info{'calls_instance_methods'};} |
| 8793 | 100 | T | F | if ($method_name =~ /^_/ and not $method_name =~ /^_new/) |
| 8796 | 50 | T | F | unless exists $instance_info{'confidence'} |
| 8799 | 100 | T | F | if keys %instance_info |
| 8832 | 100 | T | F | unless $doc |
| 8843 | 100 | T | F | if ($content =~ /use\s+(parent|base)\s+['"]?([\w:]+)['"]?/) |
| 8848 | 50 | T | F | if ($content =~ /use\s+(parent|base)\s+qw?[\(\[]?(.+?)[\)\]]?;/) |
| 8861 | 50 | T | F | if ($content =~ /(?:our\s+)?\@ISA\s*=\s*qw?[\(\[]?(.+?)[\)\]]?/) |
| 8873 | 100 | T | F | if ($content =~ /\@ISA\s*=\s*qw?[\(\[]?(.+?)[\)\]]?/) |
| 8882 | 100 | T | F | if ($method_body and $method_body =~ /SUPER::/) |
| 8884 | 50 | T | F | if ($method_body =~ /SUPER::new/) |
| 8891 | 100 | T | F | if $_[1]->isa("PPI::Statement::Sub") |
| 8895 | 100 | T | F | if ($has_own_new) { } |
| 100 | T | F | elsif (@parent_classes) { } |
| 8903 | 100 | T | F | if keys %inheritance_info |
| 8937 | 50 | T | F | unless $doc |
| 8941 | 100 | T | F | if ($target_package ne $current_package) |
| 8951 | 100 | T | F | if $_[1]->isa("PPI::Statement::Sub") |
| 8955 | 100 | T | F | unless $new_method |
| 8963 | 100 | T | F | if ($body =~ /my\s*\(\s*\$(self|class)\s*,\s*(.+?)\)\s*=\s*\@_/s) |
| 8967 | 100 | T | F | if (@param_names) |
| 8981 | 50 | T | F | if (@shift_params) |
| 8989 | 100 | T | F | if ($body =~ /croak.*unless.*(?:defined\s+)?\$(\w+)/g) |
| 8992 | 100 | T | F | if ($body =~ /die.*unless.*(?:defined\s+)?\$(\w+)/g) |
| 8996 | 100 | T | F | if (@required_params) |
| 9006 | 100 | T | F | if ($requirements{'parameters'}) |
| 9009 | 100 | T | F | if (defined $default) |
| 9016 | 100 | T | F | if (@optional_params) |
| 9021 | 100 | T | F | if keys %requirements |
| 9052 | 100 | T | F | unless $method_body |
| 9061 | 100 | T | F | if $class eq "main" or $class eq "__PACKAGE__" or $class =~ /^\$/ |
| 9065 | 100 | T | F | if ($dependency_info{'creates_objects'}) |
| 9073 | 100 | T | F | if ($method_body =~ /\$(\w+)->\w+\(/) |
| 9087 | 100 | T | F | if ($method_body =~ /my\s+\$$var\s*=\s*(\w+(?:::\w+)+)->(?:new|create)/) { } |
| 50 | T | F | elsif ($method_body =~ /my\s+\$$var\s*=\s*(\w+(?:::\w+)+)->/) { } |
| 9094 | 50 | T | F | if (@object_classes) |
| 9096 | 100 | T | F | unless $dependency_info{'package'} |
| 9103 | 100 | T | F | if keys %dependency_info |
| 9126 | 50 | T | F | unless $doc |
| 9130 | 50 | T | F | if $_[1]->isa("PPI::Statement::Include") and $_[1]->type eq "use" and $_[1]->module =~ /^(parent|base)$/ |
| 9135 | 50 | T | F | if ($parent_stmt) |
| 9142 | 100 | T | F | if $_[1]->isa("PPI::Statement") |
| 9145 | 50 | T | F | if ($isa_stmt and $isa_stmt->content =~ /['"](\w+(?:::\w+)*)['"]/) |
| 9179 | 100 | T | F | unless $package_stmt |
| 9185 | 100 | T | F | if $_[1]->isa("PPI::Statement::Sub") |
| 9188 | 50 | T | F | if ($has_new) |
| 9194 | 0 | T | F | if $parent |
| 9230 | 100 | T | F | unless $param and $code |
| 9240 | 100 | T | F | if ($clean_code =~ /\$$param\s*=\s*(?:\$$param|\$[a-zA-Z_]\w*)\s*\|\|\s*([^;]+)/) |
| 9244 | 50 | T | F | if defined $default |
| 9248 | 100 | T | F | if ($clean_code =~ m[\$$param\s*//=\s*([^;]+)]) |
| 9252 | 100 | T | F | if defined $default |
| 9257 | 100 | T | F | if ($clean_code =~ /\$$param\s*=\s*defined\s+(?:\$$param|\$[a-zA-Z_]\w*)\s*\?\s*(?:\$$param|\$[a-zA-Z_]\w*)\s*:\s*([^;]+)/) |
| 9261 | 50 | T | F | if defined $default |
| 9265 | 100 | T | F | if ($clean_code =~ /\$$param\s*=\s*([^;]+?)\s+unless\s+defined\s+(?:\$$param|\$[a-zA-Z_]\w*)/) |
| 9268 | 50 | T | F | if defined $default |
| 9272 | 100 | T | F | if ($clean_code =~ /\$$param\s*\|\|=\s*([^;]+)/) |
| 9276 | 50 | T | F | if defined $default |
| 9280 | 100 | T | F | if ($clean_code =~ m[\$$param\s*=\s*(?:\$$param|\$[a-zA-Z_]\w*)\s*//\s*([^;]+)]) |
| 9284 | 100 | T | F | if defined $default |
| 9288 | 100 | T | F | if ($clean_code =~ /if\s*\(\s*!defined\s+\$$param\s*\)\s*\{[^}]*\$$param\s*=\s*([^;]+)/s) |
| 9292 | 50 | T | F | if defined $default |
| 9296 | 100 | T | F | if ($clean_code =~ /unless\s*\(\s*defined\s+\$$param\s*\)\s*\{[^}]*\$$param\s*=\s*([^;]+)/s) |
| 9300 | 50 | T | F | if defined $default |
| 9337 | 100 | T | F | unless $code |
| 9344 | 100 | T | F | unless @{$hints{$k};} |
| 9371 | 100 | T | F | if ($code =~ /defined\s*\(\s*\$/) |
| 9376 | 100 | T | F | if ($code =~ /\beq\s*''/ or $code =~ /\blength\s*\(/) |
| 9381 | 100 | T | F | if ($code =~ /\$\w+\s*<\s*0/) |
| 9409 | 100 | T | F | if ($op eq '<') { } |
| 100 | T | F | elsif ($op eq '<=') { } |
| 100 | T | F | elsif ($op eq '>') { } |
| 50 | T | F | elsif ($op eq '>=') { } |
| 9449 | 100 | T | F | unless $pod |
| 9455 | 100 | T | F | if ($pod =~ /=head[12]\s+SYNOPSIS\s*(.+?)(?=\n=head|\z)/s) |
| 9466 | 100 | T | F | unless length $synopsis |
| 9475 | 50 | T | F | defined $3 ? : |
| 100 | T | F | defined $2 ? : |
| 9479 | 100 | T | F | if %kv |
| 9487 | 100 | T | F | unless (scalar @examples) |
| 9496 | 100 | T | F | unless @args |
| 9507 | 50 | T | F | if (scalar @examples) |
| 9552 | 100 | T | F | unless defined $value |
| 9562 | 100 | T | F | if ($value =~ m[\|\||/{2}]) |
| 9572 | 100 | T | F | if ($value =~ /^qq?\{(.*?)\}$/s) { } |
| 50 | T | F | elsif ($value =~ /^qw\{(.*?)\}$/s) { } |
| 50 | T | F | elsif ($value =~ /^q[qwx]?\s*([^a-zA-Z0-9\{\[])(.*?)\1$/s) { } |
| 9581 | 100 | T | F | if ($value =~ /^(['"])(.*)\1$/s) |
| 9584 | 100 | T | F | if ($from_code) |
| 9595 | 100 | T | F | unless ($from_code) |
| 9604 | 100 | T | F | unless ($value =~ /^\(/) |
| 9609 | 100 | T | F | if ($value =~ /^\{\s*\}$/) |
| 9614 | 100 | T | F | if ($value =~ /^\[\s*\]$/) |
| 9619 | 100 | T | F | if ($value =~ /^-?\d+(?:\.\d+)?$/) |
| 9620 | 100 | T | F | if ($value =~ /\./) { } |
| 9628 | 100 | T | F | if ($value =~ /^(true|false)$/i) |
| 9629 | 100 | T | F | lc $1 eq 'true' ? : |
| 9633 | 50 | T | F | if ($value eq '1') { } |
| 50 | T | F | elsif ($value eq '0') { } |
| 9640 | 100 | T | F | if ($value eq "undef") |
| 9645 | 100 | T | F | if ($value eq "__PACKAGE__") |
| 9653 | 100 | T | F | if ($value =~ /^\$[a-zA-Z_]/ or $value =~ /\(.*\)/) |
| 9654 | 100 | T | F | if $value =~ /^\$|\@|\%/ |
| 9706 | 50 | T | F | if $pod->{'_from_input_spec'} |
| 9709 | 100 | T | F | if (exists $pod_params->{$param} and not exists $code_params->{$param}) |
| 9714 | 50 | T | F | if (not exists $pod_params->{$param} and exists $code_params->{$param}) |
| 9715 | 100 | T | F | if ($param eq "class") |
| 9719 | 100 | T | F | if ($param eq "self") |
| 9728 | 100 | T | F | if ($pod->{'type'} and $code->{'type'} and $pod->{'type'} ne $code->{'type'}) |
| 9729 | 100 | T | F | if (not $self->_types_are_compatible($pod->{'type'}, $code->{'type'})) { } |
| 9737 | 100 | T | F | if (exists $pod->{'optional'} and exists $code->{'optional'} and $pod->{'optional'} != $code->{'optional'}) |
| 9739 | 100 | T | F | $pod->{'optional'} ? : |
| 9740 | 100 | T | F | $code->{'optional'} ? : |
| 9745 | 0 | T | F | if (defined $pod->{'min'} and defined $code->{'min'} and $pod->{'min'} != $code->{'min'}) |
| 9749 | 0 | T | F | if (defined $pod->{'max'} and defined $code->{'max'} and $pod->{'max'} != $code->{'max'}) |
| 9754 | 0 | T | F | if ($pod->{'matches'} and $code->{'matches'} and $pod->{'matches'} ne $code->{'matches'}) |
| 9783 | 100 | T | F | unless defined $val |
| 9786 | 100 | T | F | if $val =~ /^(0|off|none)$/i |
| 9787 | 100 | T | F | if $val =~ /^(1|warn|warning)$/i |
| 9788 | 100 | T | F | if $val =~ /^(2|fatal|die|error)$/i |
| 9814 | 100 | T | F | if $pod_type eq $code_type |
| 9827 | 100 | T | F | if (my $allowed = $compatible_types{$pod_type}) |
| 9832 | 50 | T | F | if (my $allowed = $compatible_types{$code_type}) |
| 9897 | 100 | T | F | if (my $errors = $schema->{'_pod_validation_errors'}) |
| 9899 | 100 | T | F | $schema->{'_pod_disagreement'} ? : |
| 9906 | 100 | T | F | if (@reports) { } |
| 9922 | 100 | T | F | if $self->{'verbose'} |