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
16750TFif defined $ENV{'APPLY_SKIP_UPDATE_CHECK'}
1680TFif ("$0" eq "-")
1800TFif ($? == 0)
1810TFif (compare_files($filename, $0))
19050TFif ($gh_err_text =~ /error connecting to / and $gh_err_text =~ /check your internet connection/)
194100TFif ($gh_err_text =~ /proxyconnect tcp:.*connect: connection refused/)
197100TFif (defined $ENV{$proxy})
204100TFif ($gh_err_text =~ /dial unix .*: connect: .*/)
21550TFif $exit_code == 0
22350TFif $gh_auth_status == 0
228100TFif (defined $ENV{$variable})
23250TFif ($gh_auth_status == 0)
24550TFunless (gh_is_happy($program))
24750TFdefined $ENV{'CI'} && $ENV{'CI'} ? :
27050TFunless $spell_check_this_config =~ /\{.*\}/s
27250TFunless eval {         do {         %config = %{decode_json($spell_check_this_config);} } }
28450TFif ($?)
30150TFunless ($should_exclude_patterns =~ /\w/)
30350TFunless $should_exclude_patterns =~ /\w/
30850TFif (-f $excludes) { }
31250TFunless /./
32050TFunless $pattern =~ /./
32650TFif $need_to_add_excludes
33250TFunless @stale
33550TFunless -f $_
33850TFunless (@expect_files)
347100TFif /^(?:$re)(?:(?:\r|\n)*$|[# ].*)/
36150TFunless @add
36550TFif (-s $new_expect_file)
37750TFif $word =~ /\S/
39650TFif defined $gh_token
404100TFunless ($curl_result == 0)
40550TFif ($curl_stdout eq "")
43050TFif ($count == 0)
450100TFif (defined $page)
45350TFif (defined $id_1 and defined $id_2)
45450TFif ($id_2 > $id_1)
462100TFif (defined $download)
474100TFif (defined $download)
48550TFif defined $gh_token
49350TFif ($curl_result != 0)
49450TFif ($curl_stdout eq "")
52250TFif ($suffix)
53350TFunless $ret >> 8
536100TFif ($gh_err_text =~ /no valid artifacts found to download|"Artifact has expired"/)
54350TFif ($expired_json ne "")
54650TFunless eval {         do {         $expired = decode_json($expired_json) } }
54750TFif ($expired)
55550TFif ($gh_err_text =~ /no artifact matches any of the names or patterns provided/)
5580TFif ($github_server_url) { }
56750TFif ($gh_err_text =~ /HTTP 404: Not Found|"status":"404"/)
5710TFif ($gh_err_text =~ /HTTP 403: API rate limit exceeded for .*?./) { }
0TFelsif ($gh_err_text =~ m[dial tcp \S+:\d+: i/o timeout$]) { }
5730TFif ($retries_remaining <= 0)
5820TFif $gh_err_text =~ /\brequest ID\s+(\S+)/
5830TFif $gh_err_text =~ /\btimestamp\s+(.*? UTC)/
5880TFunless ($has_gh_token)
5900TFif defined $gh_token
5960TFif ($curl_stdout =~ m[^HTTP/\S+\s+200]) { }
0TFelsif ($curl_stdout =~ m[^HTTP/\S+\s+403]) { }
5970TFif ($curl_stdout =~ /^x-ratelimit-remaining:\s+(\d+)$/m) { }
5990TFif $ratelimit_remaining > 10
6070TFif ($curl_stdout =~ /^retry-after:\s+(\d+)/m) { }
6140TFif $curl_stdout =~ m[^(HTTP/\S+)]
62550TFif $artifact =~ /'/
62750TFunless ($apply =~ /\{.*\}/s)
63750TFunless eval {         do {         $config_ref = decode_json($apply) } }
64250TFunless $git_repo_root =~ /\w/
658100TFif ($line =~ /\s+artifact\.zip$/)
662100TFif ($line =~ /\s+1 file$/)
66650TFif $only_file
67050TFif ($has_artifact and $only_file) { }
69650TFunless defined $first
700100TFif (-s $first) { }
70450TFif ($first =~ m[^\s*https://.*/([^/]+/[^/]+)/actions/runs/(\d+)(?:/attempts/\d+|)(?:#(\S+)|)\s*$]) { }
70950TFunless defined $repo and defined $run