Branch Coverage

File:lib/CheckSpelling/Apply.pm
Coverage:52.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
97100TFif /^\s*(?:#.*)/
12450TF$output_joined ne '' ? :
13850TFif ($? == -1)
14250TFif ($? & 127)
1430TF$? & 128 ? :
14750TFif $? == 0
16450TFif ("$0" eq "-")
17650TFif ($? == 0)
17750TFif (compare_files($filename, $0))
18650TFif ($gh_err_text =~ /error connecting to / and $gh_err_text =~ /check your internet connection/)
190100TFif ($gh_err_text =~ /proxyconnect tcp:.*connect: connection refused/)
193100TFif (defined $ENV{$proxy})
200100TFif ($gh_err_text =~ /dial unix .*: connect: .*/)
21150TFif $exit_code == 0
21950TFif $gh_auth_status == 0
224100TFif (defined $ENV{$variable})
22850TFif ($gh_auth_status == 0)
24150TFunless (gh_is_happy($program))
24350TFdefined $ENV{'CI'} && $ENV{'CI'} ? :
26650TFunless $spell_check_this_config =~ /\{.*\}/s
26850TFunless eval {         do {         %config = %{decode_json($spell_check_this_config);} } }
28050TFif ($?)
29750TFunless ($should_exclude_patterns =~ /\w/)
29950TFunless $should_exclude_patterns =~ /\w/
30450TFif (-f $excludes) { }
30850TFunless /./
31650TFunless $pattern =~ /./
32250TFif $need_to_add_excludes
32850TFunless @stale
33150TFunless -f $_
33450TFunless (@expect_files)
343100TFif /^(?:$re)(?:(?:\r|\n)*$|[# ].*)/
35750TFunless @add
36150TFif (-s $new_expect_file)
37350TFif $word =~ /\S/
39650TFif defined $gh_token
404100TFunless ($curl_result == 0)
40550TFif ($curl_stdout eq "")
43750TFif ($count == 0)
457100TFif (defined $page)
46050TFif (defined $id_1 and defined $id_2)
46150TFif ($id_2 > $id_1)
469100TFif (defined $download)
481100TFif (defined $download)
49250TFif defined $gh_token
50050TFif ($curl_result != 0)
50150TFif ($curl_stdout eq "")
52950TFif ($suffix)
54050TFunless $ret >> 8
543100TFif ($gh_err_text =~ /no valid artifacts found to download|"Artifact has expired"/)
55050TFif ($expired_json ne "")
55350TFunless eval {         do {         $expired = decode_json($expired_json) } }
55450TFif ($expired)
56250TFif ($gh_err_text =~ /no artifact matches any of the names or patterns provided/)
5650TFif ($github_server_url) { }
57450TFif ($gh_err_text =~ /HTTP 404: Not Found|"status":\s*"404"/)
5780TFif ($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$]) { }
5800TFif ($retries_remaining <= 0)
5890TFif $gh_err_text =~ /\brequest ID\s+(\S+)/
5900TFif $gh_err_text =~ /\btimestamp\s+(.*? UTC)/
5950TFunless ($has_gh_token)
5970TFif defined $gh_token
6030TFif ($curl_stdout =~ m[^HTTP/\S+\s+200]) { }
0TFelsif ($curl_stdout =~ m[^HTTP/\S+\s+403]) { }
6040TFif ($curl_stdout =~ /^x-ratelimit-remaining:\s+(\d+)$/m) { }
6060TFif $ratelimit_remaining > 10
6140TFif ($curl_stdout =~ /^retry-after:\s+(\d+)/m) { }
6210TFif $curl_stdout =~ m[^(HTTP/\S+)]
63250TFif $artifact =~ /'/
63450TFunless ($apply =~ /\{.*\}/s)
64450TFunless eval {         do {         $config_ref = decode_json($apply) } }
64950TFunless $git_repo_root =~ /\w/
665100TFif ($line =~ /\s+artifact\.zip$/)
669100TFif ($line =~ /\s+1 file$/)
67350TFif $only_file
67750TFif ($has_artifact and $only_file) { }
70350TFunless defined $first
707100TFif (-s $first) { }
71150TFif ($first =~ m[^\s*https://.*/([^/]+/[^/]+)/actions/runs/(\d+)(?:/attempts/\d+|)(?:#(\S+)|)\s*$]) { }
71650TFunless defined $repo and defined $run