check-format.pl: Add check for essentially empty line at beginning of file
@@ -1074,7 +1074,9 @@ while (<>) { # loop over all lines of all input files
$hanging_offset = 0; # compensate for this in case macro ends, e.g., as 'while (0)'
}
- unless (m/^\s*$/) { # not essentially empty line: just whitespace (and maybe a '\')
+ if (m/^\s*$/) { # essentially empty line: just whitespace (and maybe a '\')
+ report("empty line at beginnig of file") if $line == 1;
+ } else {
if ($line_before > 0) {
my $linediff = $line - $line_before - 1;
report("$linediff empty lines before") if $linediff > 1;
