Branch Coverage

blib/lib/PLS/Server/Request/TextDocument/PublishDiagnostics.pm
Criterion Covered Total %
branch 20 74 27.0


line true false branch
52 0 2 if ref $PLS::Server::State::CONFIG ne "HASH"
55 0 2 if ref $uri ne "URI::file"
71 2 0 if ref $text eq "SCALAR"
74 0 2 if length $version and $client_has_version_support
77 0 2 if $args{'close'}
81 2 0 if $PLS::Server::State::CONFIG->{'syntax'}{'enabled'}
82 2 0 if $PLS::Server::State::CONFIG->{'perlcritic'}{'enabled'}
83 0 2 if $PLS::Server::State::CONFIG->{'podchecker'}{'enabled'}
93 0 1 unless length $current_version
97 0 1 if length $version and $current_version > $version
116 2 0 if (ref $source eq 'SCALAR') { }
119 0 2 if ref $temp ne "File::Temp"
128 0 2 unless open $fh, "<", \$source_text
133 0 0 unless open $fh, "<", $path
147 0 2 if (not length $suffix or $suffix eq '.pl' or $suffix eq '.t' or $suffix eq '.plx') { }
0 2 elsif ($suffix eq '.pod') { }
167 2 14 unless ($rel =~ /\.\./)
180 2 0 if (length $module and length $relative) { }
229 0 0 if $line =~ /syntax OK$/
231 0 0 if (my($error, $file, $line_num, $area) = $line =~ /^(.+) at (.+?) line (\d+)(, .+)?/)
234 0 0 if $file eq $path
236 0 0 if ($file ne $path and $file ne $orig_path)
238 0 0 if $file ne "-e"
242 0 0 if (length $area)
244 0 0 if ($area =~ /^, near "/ and not $area =~ /"$/)
251 0 0 if $1 =~ /"$/
301 2 0 unless (length $profile)
306 2 0 unless (length $profile and -f $profile and -r $profile)
324 0 0 if ref $source eq "SCALAR"
391 0 0 unless eval {
394 0 0 unless open my $ofh, ">", \$errors
395 0 0 unless open my $ifh, "<", $source
408 0 0 if (my($severity, $error, $line_num) = $line =~ /^\**\s*([A-Z]{3,}):\s*(.+) at line (\d+) in file/)
410 0 0 $severity eq 'ERROR' ? :
430 0 0 unless (length $perltidyrc and -f $perltidyrc)
437 0 0 unless ($policy)
444 0 0 unless ($parameter)