Condition Coverage

blib/lib/PLS/Parser/Document.pm
Criterion Covered Total %
condition 141 364 38.7


and 2 conditions

line l !l condition
215 0 0 ref $results eq "ARRAY" and scalar @{$results;}
233 0 0 ref $results eq "ARRAY" and scalar @{$results;}
248 0 0 ref $results eq "ARRAY" and scalar @{$results;}
314 0 0 ref $package eq "ARRAY" and scalar @{$package;}

and 3 conditions

line !l l&&!r l&&r condition
79 1 0 50 length $path and length $uri
140 0 0 0 not $list->isa("PLS::Parser::Element") and $list->type eq "PPI::Structure::List"
145 0 0 0 builtin::blessed($word) and $word->isa("PLS::Parser::Element")
0 0 0 builtin::blessed($word) and $word->isa("PLS::Parser::Element") and not $word->element->isa("PPI::Token::Word")
150 0 0 0 builtin::blessed($word) and $word->isa("PLS::Parser::Element")
0 0 0 builtin::blessed($word) and $word->isa("PLS::Parser::Element") and $word->element->isa("PPI::Token::Word")
158 0 0 0 scalar @parts and $parts[-1] ne "SUPER"
203 0 0 0 ref $this_files_package eq "PLS::Parser::Element::Package" and $this_files_package->name eq $package
219 0 0 0 ref $this_files_package eq "PLS::Parser::Element::Package" and $this_files_package->name eq $package
222 0 0 0 builtin::blessed($found) and $found->isa("PLS::Parser::Element")
239 0 0 0 builtin::blessed($found) and $found->isa("PLS::Parser::Element")
253 0 0 0 builtin::blessed($found) and $found->isa("PLS::Parser::Element")
268 0 0 0 builtin::blessed($found) and $found->isa("PLS::Parser::Element")
490 0 0 0 $element->type eq "PPI::Token::Operator" and $element->content =~ /^-[rwxoRWXOezsfdlpSbctugkTBMAC]$/
630 0 0 0 $child->isa("PPI::Statement::Variable") and &any(sub {
635 0 0 0 $child->isa("PPI::Statement::Include") and $child->type eq "use"
0 0 0 $child->isa("PPI::Statement::Include") and $child->type eq "use" and $child->pragma eq "vars"
655 0 0 0 $child->isa("PPI::Token::Word") and $child =~ /^my|our|local|state$/
657 0 0 0 builtin::blessed($child->snext_sibling) and $child->snext_sibling->isa("PPI::Token::Symbol")
0 0 0 builtin::blessed($child->snext_sibling) and $child->snext_sibling->isa("PPI::Token::Symbol") and $child->snext_sibling->symbol eq $variable
669 0 0 0 builtin::blessed($condition) and $condition->isa("PPI::Structure::Condition")
676 0 0 0 $child->isa("PPI::Statement::Variable") and &any(sub {
688 0 0 0 builtin::blessed($declaration) and $declaration->isa("PPI::Element")
844 0 0 0 $_[0]->isa("PPI::Statement::Sub") and not $_[0]->isa("PPI::Statement::Scheduled")
876 0 0 0 length $element->module && $element->module eq 'constant'
931 0 0 0 builtin::blessed($element) and $element->isa("PPI::Statement::Variable")
1203 0 0 0 length $perltidyrc and -f $perltidyrc
0 0 0 length $perltidyrc and -f $perltidyrc and -r $perltidyrc
1212 0 0 0 $whole_file and $lines > $range->{'end'}{'line'}
1357 2 0 48 builtin::blessed($document) and $document->isa("PPI::Document")
1422 3 0 42 builtin::blessed($element) and $element->isa("PLS::Parser::Element")
3 36 6 builtin::blessed($element) and $element->isa("PLS::Parser::Element") and $element->type eq "PPI::Token::Operator"
1424 0 0 0 builtin::blessed($element->previous_sibling) && $element->previous_sibling->isa('PLS::Parser::Element') && $element->previous_sibling->element->isa('PPI::Token::Word') && $element->previous_sibling->name eq 'sub'
6 0 0 !builtin::blessed($element->element->previous_sibling) || $element->element->previous_sibling->isa('PPI::Token::Whitespace') and not builtin::blessed($element->previous_sibling) && $element->previous_sibling->isa('PLS::Parser::Element') && $element->previous_sibling->element->isa('PPI::Token::Word') && $element->previous_sibling->name eq 'sub'
6 0 0 !builtin::blessed($element->element->previous_sibling) || $element->element->previous_sibling->isa('PPI::Token::Whitespace') and not builtin::blessed($element->previous_sibling) && $element->previous_sibling->isa('PLS::Parser::Element') && $element->previous_sibling->element->isa('PPI::Token::Word') && $element->previous_sibling->name eq 'sub' and $element->content eq "-"
1444 8 0 37 builtin::blessed($element) and $element->isa("PLS::Parser::Element")
8 19 18 builtin::blessed($element) and $element->isa("PLS::Parser::Element") and $element->type eq 'PPI::Token::Quote::Double' || $element->type eq 'PPI::Token::Quote::Interpolate' || $element->type eq 'PPI::Token::QuoteLike::Regexp' || $element->type eq 'PPI::Token::QuoteLike::Command' || $element->element->isa('PPI::Token::Regexp')
1505 13 0 16 builtin::blessed($element) and $element->isa("PLS::Parser::Element")
1509 11 2 0 builtin::blessed($regexp) and $regexp->type eq 'PPI::Token::Regexp::Match' && $regexp->content eq 'm' || $regexp->type eq 'PPI::Token::Regexp::Substitute' && $regexp->content eq 's' || $regexp->type eq 'PPI::Token::Regexp::Transliterate' && ($regexp->content eq 'tr' || $regexp->content eq 'y')
1520 11 0 18 builtin::blessed($element) and $element->isa("PLS::Parser::Element")
1529 10 0 1 builtin::blessed($literal) and $literal->element->content eq "q"
9 0 1 builtin::blessed($interpolate) and $interpolate->element->content eq "qq"
8 0 1 builtin::blessed($qr) and $qr->element->content eq "qr"
7 0 1 builtin::blessed($qw) and $qw->element->content eq "qw"
6 0 1 builtin::blessed($qx) and $qx->element->content eq "qx"
1551 6 0 23 builtin::blessed($element) and $element->isa("PLS::Parser::Element")
1556 5 0 1 builtin::blessed($cast) and $cast->isa("PLS::Parser::Element")
1562 5 0 23 builtin::blessed($element) && $element->isa('PLS::Parser::Element')
23 0 5 not builtin::blessed($element) && $element->isa('PLS::Parser::Element') and builtin::blessed($closest_operator)
23 0 5 not builtin::blessed($element) && $element->isa('PLS::Parser::Element') and builtin::blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element")
0 0 5 not builtin::blessed($element) && $element->isa('PLS::Parser::Element') and builtin::blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->"
0 0 5 not builtin::blessed($element) && $element->isa('PLS::Parser::Element') and builtin::blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->" and $closest_operator->lsp_column_number + length($closest_operator->content) == $character
1579 0 0 5 builtin::blessed($closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element")
0 2 3 builtin::blessed($closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element") and $closest_operator->previous_sibling->type eq "PPI::Token::Word"
0 0 1 builtin::blessed($closest_operator->previous_sibling->element->previous_sibling) && $closest_operator->previous_sibling->element->previous_sibling->isa('PPI::Token::Operator') && $closest_operator->previous_sibling->element->previous_sibling eq '->'
2 1 2 builtin::blessed($closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element") and $closest_operator->previous_sibling->type eq "PPI::Token::Word" and not builtin::blessed($closest_operator->previous_sibling->element->previous_sibling) && $closest_operator->previous_sibling->element->previous_sibling->isa('PPI::Token::Operator') && $closest_operator->previous_sibling->element->previous_sibling eq '->'
1596 0 0 23 builtin::blessed($element) and $element->isa("PLS::Parser::Element")
1612 17 1 1 $element->type eq "PPI::Token::Symbol" and $element->lsp_column_number == $character
18 0 1 $element->type eq "PPI::Token::Symbol" and $element->lsp_column_number == $character and builtin::blessed($element->previous_sibling)
1 0 1 $element->type eq "PPI::Token::Symbol" and $element->lsp_column_number == $character and builtin::blessed($element->previous_sibling) and $element->previous_sibling->isa("PLS::Parser::Element")
1619 0 0 19 builtin::blessed($parent) and ref $parent eq "PLS::Parser::Element"
1620 10 0 9 $element->type eq "PPI::Token::Word" and builtin::blessed($parent)
10 0 9 $element->type eq "PPI::Token::Word" and builtin::blessed($parent) and $parent->isa("PLS::Parser::Element")
0 9 0 $element->type eq "PPI::Token::Word" and builtin::blessed($parent) and $parent->isa("PLS::Parser::Element") and $parent->type eq "PPI::Structure::Subscript"
1623 10 4 5 $element->type eq "PPI::Token::Word" and builtin::blessed($element->previous_sibling)
14 0 5 $element->type eq "PPI::Token::Word" and builtin::blessed($element->previous_sibling) and $element->previous_sibling->isa("PLS::Parser::Element")
4 0 5 $element->type eq "PPI::Token::Word" and builtin::blessed($element->previous_sibling) and $element->previous_sibling->isa("PLS::Parser::Element") and $element->previous_sibling->name eq "->"
1631 13 0 6 builtin::blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element")
13 0 6 builtin::blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->"
0 0 6 builtin::blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->" and $element->type eq "PPI::Token::Word"
0 1 5 builtin::blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->" and $element->type eq "PPI::Token::Word" and $element->parent->element == $closest_operator->parent->element
1649 0 0 5 builtin::blessed($closest_operator->next_sibling) and $closest_operator->next_sibling->isa("PLS::Parser::Element")
0 0 5 builtin::blessed($closest_operator->next_sibling) and $closest_operator->next_sibling->isa("PLS::Parser::Element") and $closest_operator->next_sibling->type eq "PPI::Token::Word"
0 0 5 builtin::blessed($closest_operator->next_sibling) and $closest_operator->next_sibling->isa("PLS::Parser::Element") and $closest_operator->next_sibling->type eq "PPI::Token::Word" and $closest_operator->ppi_line_number == $closest_operator->next_sibling->ppi_line_number
1662 0 0 5 builtin::blessed($closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element")
0 2 3 builtin::blessed($closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element") and $closest_operator->previous_sibling->type eq "PPI::Token::Word"
2 3 0 builtin::blessed($closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element") and $closest_operator->previous_sibling->type eq "PPI::Token::Word" and !(builtin::blessed($closest_operator->previous_sibling->previous_sibling) && $closest_operator->previous_sibling->previous_sibling->isa('PLS::Parser::Element')) || $closest_operator->previous_sibling->previous_sibling->name ne '->'
1680 13 0 1 builtin::blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element")
13 0 1 builtin::blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->"
0 0 1 builtin::blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->" and builtin::blessed($closest_operator->previous_sibling)
0 0 1 builtin::blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->" and builtin::blessed($closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element")
0 1 0 builtin::blessed($closest_operator) and $closest_operator->isa("PLS::Parser::Element") and $closest_operator->name eq "->" and builtin::blessed($closest_operator->previous_sibling) and $closest_operator->previous_sibling->isa("PLS::Parser::Element") and $closest_operator->previous_sibling->element == $element->element
1697 14 0 0 $element->name eq ":" and builtin::blessed($element->previous_sibling)
14 0 0 $element->name eq ":" and builtin::blessed($element->previous_sibling) and $element->previous_sibling->isa("PLS::Parser::Element")
0 0 0 $element->name eq ":" and builtin::blessed($element->previous_sibling) and $element->previous_sibling->isa("PLS::Parser::Element") and $element->previous_sibling->type eq 'PPI::Token::Word' || $element->previous_sibling->type eq 'PPI::Token::Label'
0 0 0 $element->name eq ":" and builtin::blessed($element->previous_sibling) and $element->previous_sibling->isa("PLS::Parser::Element") and $element->previous_sibling->type eq 'PPI::Token::Word' || $element->previous_sibling->type eq 'PPI::Token::Label' and !(builtin::blessed($element->previous_sibling->previous_sibling) && $element->previous_sibling->previous_sibling->isa('PLS::Parser::Element')) || $element->previous_sibling->previous_sibling->name ne '->'
1728 0 0 14 builtin::blessed($element->parent) and $element->parent->isa("PLS::Parser::Element")
0 14 0 builtin::blessed($element->parent) and $element->parent->isa("PLS::Parser::Element") and $element->parent->element->isa("PPI::Statement::Sub")
1751 0 0 0 builtin::blessed($list) && $list->isa('PLS::Parser::Element')
1757 0 0 0 builtin::blessed($expr) and $expr->isa("PPI::Statement::Expression")

or 2 conditions

line l !l condition
1467 14 0 $1 // ""

or 3 conditions

line l !l&&r !l&&!r condition
140 0 0 0 not builtin::blessed($list) or not $list->isa("PLS::Parser::Element") and $list->type eq "PPI::Structure::List"
385 0 0 0 $start > $column_number or $column_number > $end
623 0 0 0 $cursor->isa("PPI::Structure::Block") or $cursor->isa("PPI::Document")
1230 0 0 0 $error == 1 or length $stderr
1408 17 2 133 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label"
19 4 129 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label" or $_->type eq "PPI::Token::Symbol"
6 8 121 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label" or $_->type eq "PPI::Token::Symbol" or $_->type eq "PPI::Token::Magic"
12 4 117 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label" or $_->type eq "PPI::Token::Symbol" or $_->type eq "PPI::Token::Magic" or $_->type eq "PPI::Token::Quote::Double"
12 6 111 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label" or $_->type eq "PPI::Token::Symbol" or $_->type eq "PPI::Token::Magic" or $_->type eq "PPI::Token::Quote::Double" or $_->type eq "PPI::Token::Quote::Interpolate"
10 6 105 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label" or $_->type eq "PPI::Token::Symbol" or $_->type eq "PPI::Token::Magic" or $_->type eq "PPI::Token::Quote::Double" or $_->type eq "PPI::Token::Quote::Interpolate" or $_->type eq "PPI::Token::QuoteLike::Regexp"
12 6 99 $_->type eq "PPI::Token::Word" or $_->type eq "PPI::Token::Label" or $_->type eq "PPI::Token::Symbol" or $_->type eq "PPI::Token::Magic" or $_->type eq "PPI::Token::Quote::Double" or $_->type eq "PPI::Token::Quote::Interpolate" or $_->type eq "PPI::Token::QuoteLike::Regexp" or $_->type eq "PPI::Token::QuoteLike::Command"
1424 0 0 6 !builtin::blessed($element->element->previous_sibling) || $element->element->previous_sibling->isa('PPI::Token::Whitespace')
1444 6 10 16 $element->type eq 'PPI::Token::Quote::Double' || $element->type eq 'PPI::Token::Quote::Interpolate' || $element->type eq 'PPI::Token::QuoteLike::Regexp' || $element->type eq 'PPI::Token::QuoteLike::Command' || $element->element->isa('PPI::Token::Regexp')
1461 14 0 5 $string =~ /^(q[qrx]|[ysm]|tr)(\S)/ or $string =~ m[^()(/)]
1509 1 0 0 $regexp->type eq 'PPI::Token::Regexp::Match' && $regexp->content eq 'm' || $regexp->type eq 'PPI::Token::Regexp::Substitute' && $regexp->content eq 's' || $regexp->type eq 'PPI::Token::Regexp::Transliterate' && ($regexp->content eq 'tr' || $regexp->content eq 'y')
1662 2 0 1 !(builtin::blessed($closest_operator->previous_sibling->previous_sibling) && $closest_operator->previous_sibling->previous_sibling->isa('PLS::Parser::Element')) || $closest_operator->previous_sibling->previous_sibling->name ne '->'
1697 0 0 0 $element->previous_sibling->type eq 'PPI::Token::Word' || $element->previous_sibling->type eq 'PPI::Token::Label'
0 0 0 !(builtin::blessed($element->previous_sibling->previous_sibling) && $element->previous_sibling->previous_sibling->isa('PLS::Parser::Element')) || $element->previous_sibling->previous_sibling->name ne '->'
1718 4 1 9 $element->type eq "PPI::Token::Word" or $element->type eq "PPI::Token::Label"
5 2 7 $element->type eq "PPI::Token::Word" or $element->type eq "PPI::Token::Label" or $element->element->isa("PPI::Token::Quote")
3 3 4 $element->type eq "PPI::Token::Word" or $element->type eq "PPI::Token::Label" or $element->element->isa("PPI::Token::Quote") or $element->element->isa("PPI::Token::QuoteLike")
5 2 2 $element->type eq "PPI::Token::Word" or $element->type eq "PPI::Token::Label" or $element->element->isa("PPI::Token::Quote") or $element->element->isa("PPI::Token::QuoteLike") or $element->element->isa("PPI::Token::Regexp")
1751 0 0 0 not builtin::blessed($list) && $list->isa('PLS::Parser::Element') or $list->type ne "PPI::Structure::List"
1831 0 0 0 $child->isa('PPI::Statement::Include') || $child->isa('PPI::Token::Whitespace')
1842 0 0 0 $child->pragma eq "strict" or $child->pragma eq "warnings"
0 0 0 $child->pragma eq "parent" or $child->pragma eq "base"
1860 0 0 0 Module::CoreList::is_core($child->module) or &any(sub {
1904 0 0 0 $b->type cmp $a->type || $a->module cmp $b->module