Branch Coverage

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

line%coveragebranch
5100TFif defined $exited
5150TFif ($^O eq "MSWin32")
58100TFif -x $f
65100TFif check_exists_command($program)
78100TFif defined $token and $token ne ""
8050TFif defined $token and $token ne ""
8850TFunless defined $flags
109100TFif /^\s*(?:#.*)/
13650TF$output_joined ne '' ? :
15050TFif ($? == -1)
15450TFif ($? & 127)
1550TF$? & 128 ? :
15950TFif $? == 0
17650TFif ("$0" eq "-")
18850TFif ($? == 0)
18950TFif (compare_files($filename, $0))
19850TFif ($gh_err_text =~ /error connecting to / and $gh_err_text =~ /check your internet connection/)
202100TFif ($gh_err_text =~ /proxyconnect tcp:.*connect: connection refused/)
205100TFif (defined $ENV{$proxy})
212100TFif ($gh_err_text =~ /dial unix .*: connect: .*/)
22350TFif $exit_code == 0
23150TFif $gh_auth_status == 0
236100TFif (defined $ENV{$variable})
24050TFif ($gh_auth_status == 0)
25350TFunless (gh_is_happy($program))
25550TFdefined $ENV{'CI'} && $ENV{'CI'} ? :
2780TFunless $spell_check_this_config =~ /\{.*\}/s
2800TFunless eval {         do {         %config = %{decode_json($spell_check_this_config);} } }
2920TFif ($?)
3100TFunless ($should_exclude_patterns =~ /\w/)
3120TFunless $should_exclude_patterns =~ /\w/
3170TFif (-f $excludes) { }
3210TFunless /./
3290TFunless $pattern =~ /./
3350TFif $need_to_add_excludes
3410TFunless @stale
3450TFunless -f $_
3480TFunless (@expect_files)
3570TFif /^(?:$re)(?:(?:\r|\n)*$|[# ].*)/
3710TFunless @add
3760TFif (-s $new_expect_file)
3880TFif $word =~ /\S/
40750TFif defined $gh_token
415100TFunless ($curl_result == 0)
41650TFif ($curl_stdout eq "")
44150TFif ($count == 0)
461100TFif (defined $page)
46450TFif (defined $id_1 and defined $id_2)
46550TFif ($id_2 > $id_1)
473100TFif (defined $download)
485100TFif (defined $download)
49650TFif defined $gh_token
50450TFif ($curl_result != 0)
50550TFif ($curl_stdout eq "")
53350TFif ($suffix)
54450TFunless $ret >> 8
547100TFif ($gh_err_text =~ /no valid artifacts found to download|"Artifact has expired"/)
55450TFif ($expired_json ne "")
55750TFunless eval {         do {         $expired = decode_json($expired_json) } }
55850TFif ($expired)
56650TFif ($gh_err_text =~ /no artifact matches any of the names or patterns provided/)
5690TFif ($github_server_url) { }
57850TFif ($gh_err_text =~ /HTTP 404: Not Found|"status":"404"/)
5820TFif ($gh_err_text =~ /HTTP 403: API rate limit exceeded for .*?./) { }
0TFelsif ($gh_err_text =~ m[dial tcp \S+:\d+: i/o timeout$]) { }
5840TFif ($retries_remaining <= 0)
5930TFif $gh_err_text =~ /\brequest ID\s+(\S+)/
5940TFif $gh_err_text =~ /\btimestamp\s+(.*? UTC)/
5990TFunless ($has_gh_token)
6010TFif defined $gh_token
6070TFif ($curl_stdout =~ m[^HTTP/\S+\s+200]) { }
0TFelsif ($curl_stdout =~ m[^HTTP/\S+\s+403]) { }
6080TFif ($curl_stdout =~ /^x-ratelimit-remaining:\s+(\d+)$/m) { }
6100TFif $ratelimit_remaining > 10
6180TFif ($curl_stdout =~ /^retry-after:\s+(\d+)/m) { }
6250TFif $curl_stdout =~ m[^(HTTP/\S+)]
6350TFif $artifact =~ /'/
6380TFunless ($apply =~ /\{.*\}/s)
6480TFunless eval {         do {         $config_ref = decode_json($apply) } }
6530TFunless $git_repo_root =~ /\w/
6690TFif ($line =~ /\s+artifact\.zip$/)
6730TFif ($line =~ /\s+1 file$/)
6770TFif $only_file
6810TFif ($has_artifact and $only_file) { }
7070TFunless defined $first
7110TFif (-s $first) { }
7150TFif ($first =~ m[^\s*https://.*/([^/]+/[^/]+)/actions/runs/(\d+)(?:/attempts/\d+|)(?:#(\S+)|)\s*$]) { }
7200TFunless defined $repo and defined $run