Branch Coverage

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

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 ? :
160100TFif $? == 0
177100TFif defined $ENV{'APPLY_SKIP_UPDATE_CHECK'}
17850TFif ("$0" eq "-")
19050TFif ($? == 0)
19150TFif (compare_files($filename, $0))
20050TFif ($gh_err_text =~ /error connecting to / and $gh_err_text =~ /check your internet connection/)
204100TFif ($gh_err_text =~ /proxyconnect tcp:.*connect: connection refused/)
207100TFif (defined $ENV{$proxy})
214100TFif ($gh_err_text =~ /dial unix .*: connect: .*/)
22550TFif $exit_code == 0
23350TFif $gh_auth_status == 0
238100TFif (defined $ENV{$variable})
24250TFif ($gh_auth_status == 0)
25550TFunless (gh_is_happy($program))
25750TFdefined $ENV{'CI'} && $ENV{'CI'} ? :
2800TFunless $spell_check_this_config =~ /\{.*\}/s
2820TFunless eval {         do {         %config = %{decode_json($spell_check_this_config);} } }
2940TFif ($?)
3120TFunless ($should_exclude_patterns =~ /\w/)
3140TFunless $should_exclude_patterns =~ /\w/
3190TFif (-f $excludes) { }
3230TFunless /./
3310TFunless $pattern =~ /./
3370TFif $need_to_add_excludes
3430TFunless @stale
3470TFunless -f $_
3500TFunless (@expect_files)
3590TFif /^(?:$re)(?:(?:\r|\n)*$|[# ].*)/
3730TFunless @add
3780TFif (-s $new_expect_file)
3900TFif $word =~ /\S/
40950TFif defined $gh_token
417100TFunless ($curl_result == 0)
41850TFif ($curl_stdout eq "")
44350TFif ($count == 0)
463100TFif (defined $page)
46650TFif (defined $id_1 and defined $id_2)
46750TFif ($id_2 > $id_1)
475100TFif (defined $download)
487100TFif (defined $download)
49850TFif defined $gh_token
50650TFif ($curl_result != 0)
50750TFif ($curl_stdout eq "")
53550TFif ($suffix)
54650TFunless $ret >> 8
549100TFif ($gh_err_text =~ /no valid artifacts found to download|"Artifact has expired"/)
55650TFif ($expired_json ne "")
55950TFunless eval {         do {         $expired = decode_json($expired_json) } }
56050TFif ($expired)
56850TFif ($gh_err_text =~ /no artifact matches any of the names or patterns provided/)
5710TFif ($github_server_url) { }
58050TFif ($gh_err_text =~ /HTTP 404: Not Found|"status":"404"/)
5840TFif ($gh_err_text =~ /HTTP 403: API rate limit exceeded for .*?./) { }
0TFelsif ($gh_err_text =~ m[dial tcp \S+:\d+: i/o timeout$]) { }
5860TFif ($retries_remaining <= 0)
5950TFif $gh_err_text =~ /\brequest ID\s+(\S+)/
5960TFif $gh_err_text =~ /\btimestamp\s+(.*? UTC)/
6010TFunless ($has_gh_token)
6030TFif defined $gh_token
6090TFif ($curl_stdout =~ m[^HTTP/\S+\s+200]) { }
0TFelsif ($curl_stdout =~ m[^HTTP/\S+\s+403]) { }
6100TFif ($curl_stdout =~ /^x-ratelimit-remaining:\s+(\d+)$/m) { }
6120TFif $ratelimit_remaining > 10
6200TFif ($curl_stdout =~ /^retry-after:\s+(\d+)/m) { }
6270TFif $curl_stdout =~ m[^(HTTP/\S+)]
6370TFif $artifact =~ /'/
6400TFunless ($apply =~ /\{.*\}/s)
6500TFunless eval {         do {         $config_ref = decode_json($apply) } }
6550TFunless $git_repo_root =~ /\w/
6710TFif ($line =~ /\s+artifact\.zip$/)
6750TFif ($line =~ /\s+1 file$/)
6790TFif $only_file
6830TFif ($has_artifact and $only_file) { }
7090TFunless defined $first
7130TFif (-s $first) { }
7170TFif ($first =~ m[^\s*https://.*/([^/]+/[^/]+)/actions/runs/(\d+)(?:/attempts/\d+|)(?:#(\S+)|)\s*$]) { }
7220TFunless defined $repo and defined $run