Tests: Check for missing newlines at EOF.

This commit is contained in:
Wilson Snyder 2020-01-10 18:49:23 -05:00
parent 1234c83953
commit 16bb97687a
4 changed files with 12 additions and 7 deletions

View File

@ -3,4 +3,4 @@
* \section intro_sec Introduction
*
* This is a full doxygen analysis of the Verilator source tree.
*/
*/

View File

@ -17,5 +17,4 @@ endmodule
module array_test(
input din [0:15]
);
endmodule
endmodule

View File

@ -20,10 +20,16 @@ foreach my $file (sort keys %files) {
my $contents = file_contents($filename);
if ($file =~ /\.out$/) {
# Ignore golden files
next;
} elsif ($contents =~ /[\001\002\003\004\005\006]/) {
# Ignore binrary files
} elsif ($contents =~ /[ \t]\n/
|| $contents =~ m/\n\n+$/) { # Regexp repeated below
# Ignore binary files
next;
}
if ($contents !~ /\n$/s && $contents ne "") {
$warns{$file} = "Missing trailing newline in $file";
}
if ($contents =~ /[ \t]\n/
|| $contents =~ m/\n\n+$/) { # Regexp repeated below
my $eol_ws_exempt = ($file =~ /(\.txt|\.html)$/
|| $file =~ m!^README$!
|| $file =~ m!/gtkwave/!);

View File

@ -80,4 +80,4 @@ module Test (/*AUTOARG*/
out <= in inside {5'b1_1?1?};
end
endmodule // t
endmodule