Branch Coverage

File:lib/CheckSpelling/Apply.pm
Coverage:33.5%

line%coveragebranch
5100TFif defined $exited
5150TFif ($^O eq "MSWin32")
58100TFif -x $f
65100TFif check_exists_command($program)
79100TFif defined $token and $token ne ""
8150TFif defined $token and $token ne ""
8950TFunless defined $flags
110100TFif /^\s*(?:#.*)/
13750TF$output_joined ne '' ? :
15150TFif ($? == -1)
15550TFif ($? & 127)
1560TF$? & 128 ? :
16050TFif $? == 0
17750TFif ("$0" eq "-")
18950TFif ($? == 0)
19050TFif (compare_files($filename, $0))
19950TFif ($gh_err_text =~ /error connecting to / and $gh_err_text =~ /check your internet connection/)
203100TFif ($gh_err_text =~ /proxyconnect tcp:.*connect: connection refused/)
206100TFif (defined $ENV{$proxy})
213100TFif ($gh_err_text =~ /dial unix .*: connect: .*/)
22450TFif $exit_code == 0
23250TFif $gh_auth_status == 0
237100TFif (defined $ENV{$variable})
24150TFif ($gh_auth_status == 0)
25450TFunless (gh_is_happy($program))
25650TFdefined $ENV{'CI'} && $ENV{'CI'} ? :
2790TFunless $spell_check_this_config =~ /\{.*\}/s
2810TFunless eval {         do {         %config = %{decode_json($spell_check_this_config);} } }
2930TFif ($?)
3110TFunless ($should_exclude_patterns =~ /\w/)
3130TFunless $should_exclude_patterns =~ /\w/
3180TFif (-f $excludes) { }
3220TFunless /./
3300TFunless $pattern =~ /./
3360TFif $need_to_add_excludes
3420TFunless @stale
3460TFunless -f $_
3490TFunless (@expect_files)
3580TFif /^(?:$re)(?:(?:\r|\n)*$|[# ].*)/
3720TFunless @add
3770TFif (-s $new_expect_file)
3890TFif $word =~ /\S/
40850TFif defined $gh_token
416100TFunless ($curl_result == 0)
41750TFif ($curl_stdout eq "")
44250TFif ($count == 0)
462100TFif (defined $page)
46550TFif (defined $id_1 and defined $id_2)
46650TFif ($id_2 > $id_1)
474100TFif (defined $download)
486100TFif (defined $download)
49750TFif defined $gh_token
50550TFif ($curl_result != 0)
50650TFif ($curl_stdout eq "")
53450TFif ($suffix)
54550TFunless $ret >> 8
548100TFif ($gh_err_text =~ /no valid artifacts found to download|"Artifact has expired"/)
55550TFif ($expired_json ne "")
55850TFunless eval {         do {         $expired = decode_json($expired_json) } }
55950TFif ($expired)
56750TFif ($gh_err_text =~ /no artifact matches any of the names or patterns provided/)
5700TFif ($github_server_url) { }
57950TFif ($gh_err_text =~ /HTTP 404: Not Found|"status":"404"/)
5830TFif ($gh_err_text =~ /HTTP 403: API rate limit exceeded for .*?./) { }
0TFelsif ($gh_err_text =~ m[dial tcp \S+:\d+: i/o timeout$]) { }
5850TFif ($retries_remaining <= 0)
5940TFif $gh_err_text =~ /\brequest ID\s+(\S+)/
5950TFif $gh_err_text =~ /\btimestamp\s+(.*? UTC)/
6000TFunless ($has_gh_token)
6020TFif defined $gh_token
6080TFif ($curl_stdout =~ m[^HTTP/\S+\s+200]) { }
0TFelsif ($curl_stdout =~ m[^HTTP/\S+\s+403]) { }
6090TFif ($curl_stdout =~ /^x-ratelimit-remaining:\s+(\d+)$/m) { }
6110TFif $ratelimit_remaining > 10
6190TFif ($curl_stdout =~ /^retry-after:\s+(\d+)/m) { }
6260TFif $curl_stdout =~ m[^(HTTP/\S+)]
6360TFif $artifact =~ /'/
6390TFunless ($apply =~ /\{.*\}/s)
6490TFunless eval {         do {         $config_ref = decode_json($apply) } }
6540TFunless $git_repo_root =~ /\w/
6700TFif ($line =~ /\s+artifact\.zip$/)
6740TFif ($line =~ /\s+1 file$/)
6780TFif $only_file
6820TFif ($has_artifact and $only_file) { }
7080TFunless defined $first
7120TFif (-s $first) { }
7160TFif ($first =~ m[^\s*https://.*/([^/]+/[^/]+)/actions/runs/(\d+)(?:/attempts/\d+|)(?:#(\S+)|)\s*$]) { }
7210TFunless defined $repo and defined $run