Branch Coverage

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

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 ""
9150TFunless defined $flags
112100TFif /^\s*(?:#.*)/
13950TF$output_joined ne '' ? :
15350TFif ($? == -1)
15750TFif ($? & 127)
1580TF$? & 128 ? :
162100TFif $? == 0
182100TFif defined $ENV{'APPLY_SKIP_UPDATE_CHECK'}
18350TFif ("$0" eq "-")
19550TFif ($? == 0)
19650TFif (compare_files($filename, $0))
20550TFif ($gh_err_text =~ /error connecting to / and $gh_err_text =~ /check your internet connection/)
209100TFif ($gh_err_text =~ /proxyconnect tcp:.*connect: connection refused/)
212100TFif (defined $ENV{$proxy})
219100TFif ($gh_err_text =~ /dial unix .*: connect: .*/)
23050TFif $exit_code == 0
23850TFif $gh_auth_status == 0
243100TFif (defined $ENV{$variable})
24750TFif ($gh_auth_status == 0)
26050TFunless (gh_is_happy($program))
26250TFdefined $ENV{'CI'} && $ENV{'CI'} ? :
28550TFunless $spell_check_this_config =~ /\{.*\}/s
28750TFunless eval {         do {         %config = %{decode_json($spell_check_this_config);} } }
29950TFif ($?)
31650TFunless ($should_exclude_patterns =~ /\w/)
31850TFunless $should_exclude_patterns =~ /\w/
3230TFif (-f $excludes) { }
3270TFunless /./
3350TFunless $pattern =~ /./
3410TFif $need_to_add_excludes
34750TFunless @stale
35050TFunless -f $_
35350TFunless (@expect_files)
362100TFif /^(?:$re)(?:(?:\r|\n)*$|[# ].*)/
37650TFunless @add
38050TFif (-s $new_expect_file)
39250TFif $word =~ /\S/
41150TFif defined $gh_token
419100TFunless ($curl_result == 0)
42050TFif ($curl_stdout eq "")
44550TFif ($count == 0)
465100TFif (defined $page)
46850TFif (defined $id_1 and defined $id_2)
46950TFif ($id_2 > $id_1)
477100TFif (defined $download)
489100TFif (defined $download)
50050TFif defined $gh_token
50850TFif ($curl_result != 0)
50950TFif ($curl_stdout eq "")
53750TFif ($suffix)
54850TFunless $ret >> 8
551100TFif ($gh_err_text =~ /no valid artifacts found to download|"Artifact has expired"/)
55850TFif ($expired_json ne "")
56150TFunless eval {         do {         $expired = decode_json($expired_json) } }
56250TFif ($expired)
57050TFif ($gh_err_text =~ /no artifact matches any of the names or patterns provided/)
5730TFif ($github_server_url) { }
58250TFif ($gh_err_text =~ /HTTP 404: Not Found|"status":"404"/)
5860TFif ($gh_err_text =~ /HTTP 403: API rate limit exceeded for .*?./) { }
0TFelsif ($gh_err_text =~ m[dial tcp \S+:\d+: i/o timeout$]) { }
5880TFif ($retries_remaining <= 0)
5970TFif $gh_err_text =~ /\brequest ID\s+(\S+)/
5980TFif $gh_err_text =~ /\btimestamp\s+(.*? UTC)/
6030TFunless ($has_gh_token)
6050TFif defined $gh_token
6110TFif ($curl_stdout =~ m[^HTTP/\S+\s+200]) { }
0TFelsif ($curl_stdout =~ m[^HTTP/\S+\s+403]) { }
6120TFif ($curl_stdout =~ /^x-ratelimit-remaining:\s+(\d+)$/m) { }
6140TFif $ratelimit_remaining > 10
6220TFif ($curl_stdout =~ /^retry-after:\s+(\d+)/m) { }
6290TFif $curl_stdout =~ m[^(HTTP/\S+)]
63950TFif $artifact =~ /'/
64250TFunless ($apply =~ /\{.*\}/s)
65250TFunless eval {         do {         $config_ref = decode_json($apply) } }
65750TFunless $git_repo_root =~ /\w/
673100TFif ($line =~ /\s+artifact\.zip$/)
677100TFif ($line =~ /\s+1 file$/)
68150TFif $only_file
68550TFif ($has_artifact and $only_file) { }
71150TFunless defined $first
71550TFif (-s $first) { }
7190TFif ($first =~ m[^\s*https://.*/([^/]+/[^/]+)/actions/runs/(\d+)(?:/attempts/\d+|)(?:#(\S+)|)\s*$]) { }
7240TFunless defined $repo and defined $run