Branch Coverage

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

line%coveragebranch
5100TFif defined $exited
52100TFif ($^O eq "MSWin32")
59100TFif -x $f
66100TFif check_exists_command($program)
80100TFif defined $token and $token ne ""
82100TFif defined $token and $token ne ""
9250TFunless defined $flags
113100TFif /^\s*(?:#.*)/
14050TF$output_joined ne '' ? :
15450TFif ($? == -1)
15850TFif ($? & 127)
1590TF$? & 128 ? :
163100TFif $? == 0
183100TFif defined $ENV{'APPLY_SKIP_UPDATE_CHECK'}
18450TFif ("$0" eq "-")
19650TFif ($? == 0)
19750TFif (compare_files($filename, $0))
20650TFif ($gh_err_text =~ /error connecting to / and $gh_err_text =~ /check your internet connection/)
210100TFif ($gh_err_text =~ /proxyconnect tcp:.*connect: connection refused/)
213100TFif (defined $ENV{$proxy})
220100TFif ($gh_err_text =~ /dial unix .*: connect: .*/)
23150TFif $exit_code == 0
23950TFif $gh_auth_status == 0
244100TFif (defined $ENV{$variable})
24850TFif ($gh_auth_status == 0)
26150TFunless (gh_is_happy($program))
26350TFdefined $ENV{'CI'} && $ENV{'CI'} ? :
28650TFunless $spell_check_this_config =~ /\{.*\}/s
28850TFunless eval {         do {         %config = %{decode_json($spell_check_this_config);} } }
30050TFif ($?)
31750TFunless ($should_exclude_patterns =~ /\w/)
31950TFunless $should_exclude_patterns =~ /\w/
32450TFif (-f $excludes) { }
32850TFunless /./
33650TFunless $pattern =~ /./
34250TFif $need_to_add_excludes
34850TFunless @stale
35150TFunless -f $_
35450TFunless (@expect_files)
363100TFif /^(?:$re)(?:(?:\r|\n)*$|[# ].*)/
37750TFunless @add
38150TFif (-s $new_expect_file)
39350TFif $word =~ /\S/
41250TFif defined $gh_token
420100TFunless ($curl_result == 0)
42150TFif ($curl_stdout eq "")
44650TFif ($count == 0)
466100TFif (defined $page)
46950TFif (defined $id_1 and defined $id_2)
47050TFif ($id_2 > $id_1)
478100TFif (defined $download)
490100TFif (defined $download)
50150TFif defined $gh_token
50950TFif ($curl_result != 0)
51050TFif ($curl_stdout eq "")
53850TFif ($suffix)
54950TFunless $ret >> 8
552100TFif ($gh_err_text =~ /no valid artifacts found to download|"Artifact has expired"/)
55950TFif ($expired_json ne "")
56250TFunless eval {         do {         $expired = decode_json($expired_json) } }
56350TFif ($expired)
57150TFif ($gh_err_text =~ /no artifact matches any of the names or patterns provided/)
5740TFif ($github_server_url) { }
58350TFif ($gh_err_text =~ /HTTP 404: Not Found|"status":"404"/)
5870TFif ($gh_err_text =~ /HTTP 403: API rate limit exceeded for .*?./) { }
0TFelsif ($gh_err_text =~ m[dial tcp \S+:\d+: i/o timeout$]) { }
5890TFif ($retries_remaining <= 0)
5980TFif $gh_err_text =~ /\brequest ID\s+(\S+)/
5990TFif $gh_err_text =~ /\btimestamp\s+(.*? UTC)/
6040TFunless ($has_gh_token)
6060TFif defined $gh_token
6120TFif ($curl_stdout =~ m[^HTTP/\S+\s+200]) { }
0TFelsif ($curl_stdout =~ m[^HTTP/\S+\s+403]) { }
6130TFif ($curl_stdout =~ /^x-ratelimit-remaining:\s+(\d+)$/m) { }
6150TFif $ratelimit_remaining > 10
6230TFif ($curl_stdout =~ /^retry-after:\s+(\d+)/m) { }
6300TFif $curl_stdout =~ m[^(HTTP/\S+)]
64050TFif $artifact =~ /'/
64350TFunless ($apply =~ /\{.*\}/s)
65350TFunless eval {         do {         $config_ref = decode_json($apply) } }
65850TFunless $git_repo_root =~ /\w/
674100TFif ($line =~ /\s+artifact\.zip$/)
678100TFif ($line =~ /\s+1 file$/)
68250TFif $only_file
68650TFif ($has_artifact and $only_file) { }
71250TFunless defined $first
716100TFif (-s $first) { }
72050TFif ($first =~ m[^\s*https://.*/([^/]+/[^/]+)/actions/runs/(\d+)(?:/attempts/\d+|)(?:#(\S+)|)\s*$]) { }
72550TFunless defined $repo and defined $run