forked from lix-project/hydra
perlcritic: Don't conditionally declare variables
This commit is contained in:
parent
21e1ff0da1
commit
c603ae35f0
|
@ -306,7 +306,8 @@ sub getEvals {
|
||||||
{ order_by => "id DESC", rows => 1 });
|
{ order_by => "id DESC", rows => 1 });
|
||||||
|
|
||||||
my $curInfo = getEvalInfo($cache, $curEval);
|
my $curInfo = getEvalInfo($cache, $curEval);
|
||||||
my $prevInfo = getEvalInfo($cache, $prevEval) if defined $prevEval;
|
my $prevInfo;
|
||||||
|
$prevInfo = getEvalInfo($cache, $prevEval) if defined $prevEval;
|
||||||
|
|
||||||
# Compute what inputs changed between each eval.
|
# Compute what inputs changed between each eval.
|
||||||
my @changedInputs;
|
my @changedInputs;
|
||||||
|
|
|
@ -82,7 +82,8 @@ sub buildFinished {
|
||||||
my $versionRE = "(?:[A-Za-z0-9\.\-]+)";
|
my $versionRE = "(?:[A-Za-z0-9\.\-]+)";
|
||||||
|
|
||||||
my $shortName = basename($covTarball);
|
my $shortName = basename($covTarball);
|
||||||
my $version = $2 if $shortName =~ /^($pkgNameRE)-($versionRE)-coverity-int.*$/;
|
my $version;
|
||||||
|
$version = $2 if $shortName =~ /^($pkgNameRE)-($versionRE)-coverity-int.*$/;
|
||||||
|
|
||||||
die "CoverityScan.pm: Couldn't parse build version for upload! ($shortName)"
|
die "CoverityScan.pm: Couldn't parse build version for upload! ($shortName)"
|
||||||
unless defined $version;
|
unless defined $version;
|
||||||
|
|
|
@ -122,7 +122,8 @@ sub fetchInputBuild {
|
||||||
my $versionRE = "(?:[A-Za-z0-9\.\-]+)";
|
my $versionRE = "(?:[A-Za-z0-9\.\-]+)";
|
||||||
|
|
||||||
my $relName = ($prevBuild->releasename or $prevBuild->nixname);
|
my $relName = ($prevBuild->releasename or $prevBuild->nixname);
|
||||||
my $version = $2 if $relName =~ /^($pkgNameRE)-($versionRE)$/;
|
my $version;
|
||||||
|
$version = $2 if $relName =~ /^($pkgNameRE)-($versionRE)$/;
|
||||||
|
|
||||||
my $mainOutput = getMainOutput($prevBuild);
|
my $mainOutput = getMainOutput($prevBuild);
|
||||||
|
|
||||||
|
@ -167,7 +168,8 @@ sub fetchInputSystemBuild {
|
||||||
my $versionRE = "(?:[A-Za-z0-9\.\-]+)";
|
my $versionRE = "(?:[A-Za-z0-9\.\-]+)";
|
||||||
|
|
||||||
my $relName = ($prevBuild->releasename or $prevBuild->nixname);
|
my $relName = ($prevBuild->releasename or $prevBuild->nixname);
|
||||||
my $version = $2 if $relName =~ /^($pkgNameRE)-($versionRE)$/;
|
my $version;
|
||||||
|
$version = $2 if $relName =~ /^($pkgNameRE)-($versionRE)$/;
|
||||||
|
|
||||||
my $input =
|
my $input =
|
||||||
{ storePath => getMainOutput($prevBuild)->path
|
{ storePath => getMainOutput($prevBuild)->path
|
||||||
|
|
Loading…
Reference in a new issue