Branch Coverage

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

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/
39250TFif defined $gh_token
400100TFunless ($curl_result == 0)
40150TFif ($curl_stdout eq "")
42650TFif ($count == 0)
446100TFif (defined $page)
44950TFif (defined $id_1 and defined $id_2)
45050TFif ($id_2 > $id_1)
45850TFif (defined $download)
470100TFif (defined $download)
48150TFif defined $gh_token
48950TFif ($curl_result != 0)
49050TFif ($curl_stdout eq "")
51850TFif ($suffix)
52950TFunless $ret >> 8
532100TFif ($gh_err_text =~ /no valid artifacts found to download|"Artifact has expired"/)
53950TFif ($expired_json ne "")
54250TFunless eval {         do {         $expired = decode_json($expired_json) } }
54350TFif ($expired)
55150TFif ($gh_err_text =~ /no artifact matches any of the names or patterns provided/)
5540TFif ($github_server_url) { }
56350TFif ($gh_err_text =~ /HTTP 404: Not Found|"status":"404"/)
5670TFif ($gh_err_text =~ /HTTP 403: API rate limit exceeded for .*?./) { }
0TFelsif ($gh_err_text =~ m[dial tcp \S+:\d+: i/o timeout$]) { }
5690TFif ($retries_remaining <= 0)
5780TFif $gh_err_text =~ /\brequest ID\s+(\S+)/
5790TFif $gh_err_text =~ /\btimestamp\s+(.*? UTC)/
5840TFunless ($has_gh_token)
5860TFif defined $gh_token
5920TFif ($curl_stdout =~ m[^HTTP/\S+\s+200]) { }
0TFelsif ($curl_stdout =~ m[^HTTP/\S+\s+403]) { }
5930TFif ($curl_stdout =~ /^x-ratelimit-remaining:\s+(\d+)$/m) { }
5950TFif $ratelimit_remaining > 10
6030TFif ($curl_stdout =~ /^retry-after:\s+(\d+)/m) { }
6100TFif $curl_stdout =~ m[^(HTTP/\S+)]
62150TFif $artifact =~ /'/
62350TFunless ($apply =~ /\{.*\}/s)
63350TFunless eval {         do {         $config_ref = decode_json($apply) } }
63850TFunless $git_repo_root =~ /\w/
654100TFif ($line =~ /\s+artifact\.zip$/)
658100TFif ($line =~ /\s+1 file$/)
66250TFif $only_file
66650TFif ($has_artifact and $only_file) { }
69250TFunless defined $first
696100TFif (-s $first) { }
70050TFif ($first =~ m[^\s*https://.*/([^/]+/[^/]+)/actions/runs/(\d+)(?:/attempts/\d+|)(?:#(\S+)|)\s*$]) { }
70550TFunless defined $repo and defined $run