Branch Coverage

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

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 ""
760TFunless defined $flags
97100TFif /^\s*(?:#.*)/
12450TF$output_joined ne '' ? :
13850TFif ($? == -1)
14250TFif ($? & 127)
1430TF$? & 128 ? :
14750TFif $? == 0
16450TFif defined $ENV{'APPLY_SKIP_UPDATE_CHECK'}
1650TFif ("$0" eq "-")
1770TFif ($? == 0)
1780TFif (compare_files($filename, $0))
18750TFif ($gh_err_text =~ /error connecting to / and $gh_err_text =~ /check your internet connection/)
191100TFif ($gh_err_text =~ /proxyconnect tcp:.*connect: connection refused/)
194100TFif (defined $ENV{$proxy})
201100TFif ($gh_err_text =~ /dial unix .*: connect: .*/)
21250TFif $exit_code == 0
22050TFif $gh_auth_status == 0
225100TFif (defined $ENV{$variable})
22950TFif ($gh_auth_status == 0)
24250TFunless (gh_is_happy($program))
24450TFdefined $ENV{'CI'} && $ENV{'CI'} ? :
26750TFunless $spell_check_this_config =~ /\{.*\}/s
26950TFunless eval {         do {         %config = %{decode_json($spell_check_this_config);} } }
28150TFif ($?)
29850TFunless ($should_exclude_patterns =~ /\w/)
30050TFunless $should_exclude_patterns =~ /\w/
30550TFif (-f $excludes) { }
30950TFunless /./
31750TFunless $pattern =~ /./
32350TFif $need_to_add_excludes
32950TFunless @stale
33250TFunless -f $_
33550TFunless (@expect_files)
344100TFif /^(?:$re)(?:(?:\r|\n)*$|[# ].*)/
35850TFunless @add
36250TFif (-s $new_expect_file)
37450TFif $word =~ /\S/
39750TFif defined $gh_token
405100TFunless ($curl_result == 0)
40650TFif ($curl_stdout eq "")
43850TFif ($count == 0)
458100TFif (defined $page)
46150TFif (defined $id_1 and defined $id_2)
46250TFif ($id_2 > $id_1)
470100TFif (defined $download)
482100TFif (defined $download)
49350TFif defined $gh_token
50150TFif ($curl_result != 0)
50250TFif ($curl_stdout eq "")
53050TFif ($suffix)
54150TFunless $ret >> 8
544100TFif ($gh_err_text =~ /no valid artifacts found to download|"Artifact has expired"/)
55150TFif ($expired_json ne "")
55450TFunless eval {         do {         $expired = decode_json($expired_json) } }
55550TFif ($expired)
56350TFif ($gh_err_text =~ /no artifact matches any of the names or patterns provided/)
5660TFif ($github_server_url) { }
57550TFif ($gh_err_text =~ /HTTP 404: Not Found|"status":\s*"404"/)
5790TFif ($gh_err_text =~ /API rate limit exceeded for .*?./ and $gh_err_text =~ /HTTP 403|"status":\s*"403"/) { }
0TFelsif ($gh_err_text =~ m[dial tcp \S+:\d+: i/o timeout$]) { }
5810TFif ($retries_remaining <= 0)
5900TFif $gh_err_text =~ /\brequest ID\s+(\S+)/
5910TFif $gh_err_text =~ /\btimestamp\s+(.*? UTC)/
5960TFunless ($has_gh_token)
5980TFif defined $gh_token
6040TFif ($curl_stdout =~ m[^HTTP/\S+\s+200]) { }
0TFelsif ($curl_stdout =~ m[^HTTP/\S+\s+403]) { }
6050TFif ($curl_stdout =~ /^x-ratelimit-remaining:\s+(\d+)$/m) { }
6070TFif $ratelimit_remaining > 10
6150TFif ($curl_stdout =~ /^retry-after:\s+(\d+)/m) { }
6220TFif $curl_stdout =~ m[^(HTTP/\S+)]
63350TFif $artifact =~ /'/
63550TFunless ($apply =~ /\{.*\}/s)
64550TFunless eval {         do {         $config_ref = decode_json($apply) } }
65050TFunless $git_repo_root =~ /\w/
666100TFif ($line =~ /\s+artifact\.zip$/)
670100TFif ($line =~ /\s+1 file$/)
67450TFif $only_file
67850TFif ($has_artifact and $only_file) { }
70450TFunless defined $first
708100TFif (-s $first) { }
71250TFif ($first =~ m[^\s*https://.*/([^/]+/[^/]+)/actions/runs/(\d+)(?:/attempts/\d+|)(?:#(\S+)|)\s*$]) { }
71750TFunless defined $repo and defined $run