X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=util%2Fcheck-format.pl;fp=util%2Fcheck-format.pl;h=2bbf7e7c54a276fe48ef683fc29053adbeb453cf;hp=5b31cacad75a4fe4d0122d70046c7a0825e17dda;hb=dc18781550d5df62074d0ad16680a6dda862df6e;hpb=43b2e9e0088192f7e116b9b198a8c662ade193eb diff --git a/util/check-format.pl b/util/check-format.pl index 5b31cacad7..2bbf7e7c54 100755 --- a/util/check-format.pl +++ b/util/check-format.pl @@ -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;