Branch Coverage

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

line%coveragebranch
360TFif ($^O eq "MSWin32")
430TFif -x $f
500TFif check_exists_command($program)
63100TFif defined $token and $token ne ""
6550TFif defined $token and $token ne ""
7550TFunless defined $flags
96100TFif /^\s*(?:#.*)/
12350TF$output_joined ne '' ? :
13750TFif ($? == -1)
14150TFif ($? & 127)
1420TF$? & 128 ? :
14650TFif $? == 0
16350TFif ("$0" eq "-")
17550TFif ($? == 0)
17650TFif (compare_files($filename, $0))
18550TFif ($gh_err_text =~ /error connecting to / and $gh_err_text =~ /check your internet connection/)
189100TFif ($gh_err_text =~ /proxyconnect tcp:.*connect: connection refused/)
192100TFif (defined $ENV{$proxy})
199100TFif ($gh_err_text =~ /dial unix .*: connect: .*/)
21050TFif $exit_code == 0
21850TFif $gh_auth_status == 0
223100TFif (defined $ENV{$variable})
22750TFif ($gh_auth_status == 0)
24050TFunless (gh_is_happy($program))
24250TFdefined $ENV{'CI'} && $ENV{'CI'} ? :
2650TFunless $spell_check_this_config =~ /\{.*\}/s
2670TFunless eval {         do {         %config = %{decode_json($spell_check_this_config);} } }
2790TFif ($?)
2970TFunless ($should_exclude_patterns =~ /\w/)
2990TFunless $should_exclude_patterns =~ /\w/
3040TFif (-f $excludes) { }
3080TFunless /./
3160TFunless $pattern =~ /./
3220TFif $need_to_add_excludes
3280TFunless @stale
3320TFunless -f $_
3350TFunless (@expect_files)
3440TFif /^(?:$re)(?:(?:\r|\n)*$|[# ].*)/
3580TFunless @add
3630TFif (-s $new_expect_file)
3750TFif $word =~ /\S/
39850TFif defined $gh_token
406100TFunless ($curl_result == 0)
40750TFif ($curl_stdout eq "")
43950TFif ($count == 0)
459100TFif (defined $page)
46250TFif (defined $id_1 and defined $id_2)
46350TFif ($id_2 > $id_1)
471100TFif (defined $download)
483100TFif (defined $download)
49450TFif defined $gh_token
50250TFif ($curl_result != 0)
50350TFif ($curl_stdout eq "")
53150TFif ($suffix)
54250TFunless $ret >> 8
545100TFif ($gh_err_text =~ /no valid artifacts found to download|"Artifact has expired"/)
55250TFif ($expired_json ne "")
55550TFunless eval {         do {         $expired = decode_json($expired_json) } }
55650TFif ($expired)
56450TFif ($gh_err_text =~ /no artifact matches any of the names or patterns provided/)
5670TFif ($github_server_url) { }
57650TFif ($gh_err_text =~ /HTTP 404: Not Found|"status":\s*"404"/)
5800TFif ($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$]) { }
5820TFif ($retries_remaining <= 0)
5910TFif $gh_err_text =~ /\brequest ID\s+(\S+)/
5920TFif $gh_err_text =~ /\btimestamp\s+(.*? UTC)/
5970TFunless ($has_gh_token)
5990TFif defined $gh_token
6050TFif ($curl_stdout =~ m[^HTTP/\S+\s+200]) { }
0TFelsif ($curl_stdout =~ m[^HTTP/\S+\s+403]) { }
6060TFif ($curl_stdout =~ /^x-ratelimit-remaining:\s+(\d+)$/m) { }
6080TFif $ratelimit_remaining > 10
6160TFif ($curl_stdout =~ /^retry-after:\s+(\d+)/m) { }
6230TFif $curl_stdout =~ m[^(HTTP/\S+)]
6330TFif $artifact =~ /'/
6360TFunless ($apply =~ /\{.*\}/s)
6460TFunless eval {         do {         $config_ref = decode_json($apply) } }
6510TFunless $git_repo_root =~ /\w/
6670TFif ($line =~ /\s+artifact\.zip$/)
6710TFif ($line =~ /\s+1 file$/)
6750TFif $only_file
6790TFif ($has_artifact and $only_file) { }
7050TFunless defined $first
7090TFif (-s $first) { }
7130TFif ($first =~ m[^\s*https://.*/([^/]+/[^/]+)/actions/runs/(\d+)(?:/attempts/\d+|)(?:#(\S+)|)\s*$]) { }
7180TFunless defined $repo and defined $run