Commit 1e9b61b7 authored by Evan Hunt's avatar Evan Hunt

Merge branch...

Merge branch '283-ensure-there-is-a-blank-line-before-a-changes-entry-and-a-release-marker' into 'v9_11'

Resolve "ensure there is a blank line before a changes entry and a release marker."

Closes #283

See merge request !311
parents 32cc7c80 33f8dd5f
Pipeline #1866 failed with stages
in 31 seconds
......@@ -24,11 +24,11 @@ $\ = "\n"; # set output record separator
$change = 0;
$status = 0;
$wasblank = 1;
line: while (<>) {
($Fld1,$Fld2,$Fld3,$Fld4) = split(' ', $_, 9999);
$change = 0 if (!$master && $Fld1 eq "---" &&
$Fld3 eq "released" && $Fld4 eq "---");
$change = 0 if (!$master && /^\s+--- .* ---$/);
if ($Fld1 =~ /^[1-9][0-9]*\.$/ && $Fld2 =~ /^\[.*\]$/) {
if ($change != 0 && $Fld1 >= $change) {
print 'bad change number', $Fld1;
......@@ -39,6 +39,21 @@ line: while (<>) {
$status = 1;
}
$change = $Fld1;
if (!$wasblank) {
print 'missing blank line before change', $Fld1;
$status = 1;
}
}
if (/^\s+--- .* ---$/) {
if (!$wasblank) {
print 'missing blank line before release marker for', $Fld2;
$status = 1;
}
}
if ($Fld1 eq "") {
$wasblank = 1;
} else {
$wasblank = 0;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment