Branch Coverage

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

line%coveragebranch
36100TFif ($^O eq "MSWin32")
43100TFif -x $f
50100TFif check_exists_command($command)
64100TFif defined $token and $token ne ""
66100TFif defined $token and $token ne ""
7650TFunless defined $flags
95100TFunless open INPUT, "<", $file
97100TFif /^\s*(?:#.*)/
12450TF$output_joined ne '' ? :
13850TFif ($? == -1)
14250TFif ($? & 127)
1430TF$? & 128 ? :
14750TFif $? == 0
167100TFif defined $ENV{'APPLY_SKIP_UPDATE_CHECK'}
168100TFif ("$0" eq "-")
18050TFif ($? == 0)
18150TFif (compare_files($filename, $0))
19050TFif ($gh_err_text =~ /error connecting to / and $gh_err_text =~ /check your internet connection/)
194100TFif ($gh_err_text =~ /proxyconnect tcp:.*connect: connection refused/)
197100TFif (defined $ENV{$proxy})
204100TFif ($gh_err_text =~ /dial unix .*: connect: .*/)
21550TFif $exit_code == 0
22350TFif $gh_auth_status == 0
228100TFif (defined $ENV{$variable})
23250TFif ($gh_auth_status == 0)
24550TFunless (gh_is_happy($program))
24750TFdefined $ENV{'CI'} && $ENV{'CI'} ? :
27050TFunless $spell_check_this_config =~ /\{.*\}/s
27250TFunless eval {         do {         %config = %{decode_json($spell_check_this_config);} } }
28450TFif ($?)
30150TFunless ($should_exclude_patterns =~ /\w/)
30350TFunless $should_exclude_patterns =~ /\w/
30850TFif (-f $excludes) { }
31250TFunless /./
32050TFunless $pattern =~ /./
32650TFif $need_to_add_excludes
33250TFunless @stale
33550TFunless -f $_
33850TFunless (@expect_files)
347100TFif /^(?:$re)(?:(?:\r|\n)*$|[# ].*)/
36150TFunless @add
36550TFif (-s $new_expect_file)
37750TFif $word =~ /\S/
40050TFif defined $gh_token
408100TFunless ($curl_result == 0)
40950TFif ($curl_stdout eq "")
44150TFif ($count == 0)
461100TFif (defined $page)
46450TFif (defined $id_1 and defined $id_2)
46550TFif ($id_2 > $id_1)
473100TFif (defined $download)
485100TFif (defined $download)
49650TFif defined $gh_token
50450TFif ($curl_result != 0)
50550TFif ($curl_stdout eq "")
53350TFif ($suffix)
54450TFunless $ret >> 8
547100TFif ($gh_err_text =~ /no valid artifacts found to download|"Artifact has expired"/)
55450TFif ($expired_json ne "")
55750TFunless eval {         do {         $expired = decode_json($expired_json) } }
55850TFif ($expired)
56650TFif ($gh_err_text =~ /no artifact matches any of the names or patterns provided/)
5690TFif ($github_server_url) { }
57850TFif ($gh_err_text =~ /HTTP 404: Not Found|"status":\s*"404"/)
5820TFif ($gh_err_text =~ /API rate limit exceeded for .*?./ and $gh_err_text =~ /HTTP 403|"status":\s*"403"/) { }
0TFelsif ($gh_err_text =~ /HTTP 502:/ or $gh_err_text =~ /"status":\s*"502"/) { }
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|502)]) { }
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+)]
63750TFif $artifact =~ /'/
63950TFunless ($apply =~ /\{.*\}/s)
64950TFunless eval {         do {         $config_ref = decode_json($apply) } }
65450TFunless $git_repo_root =~ /\w/
670100TFif ($line =~ /\s+artifact\.zip$/)
674100TFif ($line =~ /\s+1 file$/)
67850TFif $only_file
68250TFif ($has_artifact and $only_file) { }
70850TFunless defined $first
712100TFif (-s $first) { }
71650TFif ($first =~ m[^\s*https://.*/([^/]+/[^/]+)/actions/runs/(\d+)(?:/attempts/\d+|)(?:#(\S+)|)\s*$]) { }
72150TFunless defined $repo and defined $run