Branch Coverage

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

line%coveragebranch
5100TFif defined $exited
51100TFif ($^O eq "MSWin32")
58100TFif -x $f
65100TFif check_exists_command($program)
79100TFif defined $token and $token ne ""
81100TFif defined $token and $token ne ""
9050TFunless defined $flags
111100TFif /^\s*(?:#.*)/
13850TF$output_joined ne '' ? :
15250TFif ($? == -1)
15650TFif ($? & 127)
1570TF$? & 128 ? :
16150TFif $? == 0
178100TFif defined $ENV{'APPLY_SKIP_UPDATE_CHECK'}
17950TFif ("$0" eq "-")
19150TFif ($? == 0)
19250TFif (compare_files($filename, $0))
20150TFif ($gh_err_text =~ /error connecting to / and $gh_err_text =~ /check your internet connection/)
205100TFif ($gh_err_text =~ /proxyconnect tcp:.*connect: connection refused/)
208100TFif (defined $ENV{$proxy})
215100TFif ($gh_err_text =~ /dial unix .*: connect: .*/)
22650TFif $exit_code == 0
23450TFif $gh_auth_status == 0
239100TFif (defined $ENV{$variable})
24350TFif ($gh_auth_status == 0)
25650TFunless (gh_is_happy($program))
25850TFdefined $ENV{'CI'} && $ENV{'CI'} ? :
2810TFunless $spell_check_this_config =~ /\{.*\}/s
2830TFunless eval {         do {         %config = %{decode_json($spell_check_this_config);} } }
2950TFif ($?)
3130TFunless ($should_exclude_patterns =~ /\w/)
3150TFunless $should_exclude_patterns =~ /\w/
3200TFif (-f $excludes) { }
3240TFunless /./
3320TFunless $pattern =~ /./
3380TFif $need_to_add_excludes
3440TFunless @stale
3480TFunless -f $_
3510TFunless (@expect_files)
3600TFif /^(?:$re)(?:(?:\r|\n)*$|[# ].*)/
3740TFunless @add
3790TFif (-s $new_expect_file)
3910TFif $word =~ /\S/
41050TFif defined $gh_token
418100TFunless ($curl_result == 0)
41950TFif ($curl_stdout eq "")
44450TFif ($count == 0)
464100TFif (defined $page)
46750TFif (defined $id_1 and defined $id_2)
46850TFif ($id_2 > $id_1)
476100TFif (defined $download)
488100TFif (defined $download)
49950TFif defined $gh_token
50750TFif ($curl_result != 0)
50850TFif ($curl_stdout eq "")
53650TFif ($suffix)
54750TFunless $ret >> 8
550100TFif ($gh_err_text =~ /no valid artifacts found to download|"Artifact has expired"/)
55750TFif ($expired_json ne "")
56050TFunless eval {         do {         $expired = decode_json($expired_json) } }
56150TFif ($expired)
56950TFif ($gh_err_text =~ /no artifact matches any of the names or patterns provided/)
5720TFif ($github_server_url) { }
58150TFif ($gh_err_text =~ /HTTP 404: Not Found|"status":"404"/)
5850TFif ($gh_err_text =~ /HTTP 403: API rate limit exceeded for .*?./) { }
0TFelsif ($gh_err_text =~ m[dial tcp \S+:\d+: i/o timeout$]) { }
5870TFif ($retries_remaining <= 0)
5960TFif $gh_err_text =~ /\brequest ID\s+(\S+)/
5970TFif $gh_err_text =~ /\btimestamp\s+(.*? UTC)/
6020TFunless ($has_gh_token)
6040TFif defined $gh_token
6100TFif ($curl_stdout =~ m[^HTTP/\S+\s+200]) { }
0TFelsif ($curl_stdout =~ m[^HTTP/\S+\s+403]) { }
6110TFif ($curl_stdout =~ /^x-ratelimit-remaining:\s+(\d+)$/m) { }
6130TFif $ratelimit_remaining > 10
6210TFif ($curl_stdout =~ /^retry-after:\s+(\d+)/m) { }
6280TFif $curl_stdout =~ m[^(HTTP/\S+)]
6380TFif $artifact =~ /'/
6410TFunless ($apply =~ /\{.*\}/s)
6510TFunless eval {         do {         $config_ref = decode_json($apply) } }
6560TFunless $git_repo_root =~ /\w/
6720TFif ($line =~ /\s+artifact\.zip$/)
6760TFif ($line =~ /\s+1 file$/)
6800TFif $only_file
6840TFif ($has_artifact and $only_file) { }
7100TFunless defined $first
7140TFif (-s $first) { }
7180TFif ($first =~ m[^\s*https://.*/([^/]+/[^/]+)/actions/runs/(\d+)(?:/attempts/\d+|)(?:#(\S+)|)\s*$]) { }
7230TFunless defined $repo and defined $run