Branch Coverage

blib/lib/App/GHGen/Fixer.pm
Criterion Covered Total %
branch 28 76 36.8


line true false branch
57 0 4 unless can_auto_fix($issue)
59 1 3 if ($issue->{'type'} eq 'performance' and $issue->{'message'} =~ /caching/u) { }
0 3 elsif ($issue->{'type'} eq 'security' and $issue->{'message'} =~ /unpinned/u) { }
0 3 elsif ($issue->{'type'} eq 'security' and $issue->{'message'} =~ /permissions/u) { }
0 3 elsif ($issue->{'type'} eq 'maintenance' and $issue->{'message'} =~ /outdated action/u) { }
1 2 elsif ($issue->{'type'} eq 'cost' and $issue->{'message'} =~ /concurrency/u) { }
1 1 elsif ($issue->{'type'} eq 'cost' and $issue->{'message'} =~ /triggers/u) { }
0 1 elsif ($issue->{'type'} eq 'maintenance' and $issue->{'message'} =~ /runner/u) { }
1 0 elsif ($issue->{'type'} eq 'performance' and $issue->{'message'} =~ /missing timeout-minutes/u) { }
97 0 0 if ($fixes > 0)
107 0 1 unless my $jobs = $workflow->{'jobs'}
111 0 1 unless my $steps = $job->{'steps'}
114 1 1 if $_->{'uses'}
115 0 1 if $has_cache
119 1 0 unless $cache_step
124 0 0 if ($steps->[$i]{'uses'} and $steps->[$i]{'uses'} =~ m[actions/checkout]u)
143 0 2 if ($run =~ /npm (install|ci)/u or $step->{'uses'} and $step->{'uses'} =~ /setup-node/u)
156 0 2 if ($run =~ /pip install/u or $step->{'uses'} and $step->{'uses'} =~ /setup-python/u)
169 0 2 if ($run =~ /cargo (build|test)/u)
181 0 2 if ($run =~ /go (build|test)/u or $step->{'uses'} and $step->{'uses'} =~ /setup-go/u)
198 0 0 unless my $jobs = $workflow->{'jobs'}
202 0 0 unless my $steps = $job->{'steps'}
204 0 0 unless $step->{'uses'}
206 0 0 if ($step->{'uses'} =~ /^(.+)\@(master|main)$/u)
220 0 0 if $workflow->{'permissions'}
227 0 0 unless my $jobs = $workflow->{'jobs'}
242 0 0 unless my $steps = $job->{'steps'}
244 0 0 unless $step->{'uses'}
247 0 0 if ($step->{'uses'} =~ /^\Q$old\E/u)
259 0 1 if $workflow->{'concurrency'}
269 0 1 unless my $on = $workflow->{'on'}
273 0 1 if (ref $on eq 'ARRAY' and grep {$_ eq 'push';} @$on) { }
0 1 elsif (ref $on eq 'HASH' and $on->{'push'} and ref $on->{'push'} eq '') { }
296 0 1 unless my $jobs = $workflow->{'jobs'}
303 0 1 if exists $job->{'timeout-minutes'}
314 0 0 unless my $jobs = $workflow->{'jobs'}
325 0 0 unless my $runs_on = $job->{'runs-on'}
327 0 0 if (exists $runner_updates{$runs_on})