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/
39750TFif defined $gh_token
405100TFunless ($curl_result == 0)
40650TFif ($curl_stdout eq "")
43150TFif ($count == 0)
451100TFif (defined $page)
45450TFif (defined $id_1 and defined $id_2)
45550TFif ($id_2 > $id_1)
463100TFif (defined $download)
475100TFif (defined $download)
48650TFif defined $gh_token
49450TFif ($curl_result != 0)
49550TFif ($curl_stdout eq "")
52350TFif ($suffix)
53450TFunless $ret >> 8
537100TFif ($gh_err_text =~ /no valid artifacts found to download|"Artifact has expired"/)
54450TFif ($expired_json ne "")
54750TFunless eval {         do {         $expired = decode_json($expired_json) } }
54850TFif ($expired)
55650TFif ($gh_err_text =~ /no artifact matches any of the names or patterns provided/)
5590TFif ($github_server_url) { }
56850TFif ($gh_err_text =~ /HTTP 404: Not Found|"status":"404"/)
5720TFif ($gh_err_text =~ /HTTP 403: API rate limit exceeded for .*?./) { }
0TFelsif ($gh_err_text =~ /HTTP 502:/) { }
0TFelsif ($gh_err_text =~ m[dial tcp \S+:\d+: i/o timeout$]) { }
5750TFif ($retries_remaining <= 0)
5840TFif $gh_err_text =~ /\brequest ID\s+(\S+)/
5850TFif $gh_err_text =~ /\btimestamp\s+(.*? UTC)/
5900TFunless ($has_gh_token)
5920TFif defined $gh_token
5980TFif ($curl_stdout =~ m[^HTTP/\S+\s+200]) { }
0TFelsif ($curl_stdout =~ m[^HTTP/\S+\s+(?:403|502)]) { }
5990TFif ($curl_stdout =~ /^x-ratelimit-remaining:\s+(\d+)$/m) { }
6010TFif $ratelimit_remaining > 10
6090TFif ($curl_stdout =~ /^retry-after:\s+(\d+)/m) { }
6160TFif $curl_stdout =~ m[^(HTTP/\S+)]
62750TFif $artifact =~ /'/
62950TFunless ($apply =~ /\{.*\}/s)
63950TFunless eval {         do {         $config_ref = decode_json($apply) } }
64450TFunless $git_repo_root =~ /\w/
660100TFif ($line =~ /\s+artifact\.zip$/)
664100TFif ($line =~ /\s+1 file$/)
66850TFif $only_file
67250TFif ($has_artifact and $only_file) { }
69850TFunless defined $first
702100TFif (-s $first) { }
70650TFif ($first =~ m[^\s*https://.*/([^/]+/[^/]+)/actions/runs/(\d+)(?:/attempts/\d+|)(?:#(\S+)|)\s*$]) { }
71150TFunless defined $repo and defined $run