mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Tests: Check for missing newlines at EOF.
This commit is contained in:
parent
1234c83953
commit
16bb97687a
@ -3,4 +3,4 @@
|
||||
* \section intro_sec Introduction
|
||||
*
|
||||
* This is a full doxygen analysis of the Verilator source tree.
|
||||
*/
|
||||
*/
|
||||
|
@ -17,5 +17,4 @@ endmodule
|
||||
module array_test(
|
||||
input din [0:15]
|
||||
);
|
||||
|
||||
endmodule
|
||||
endmodule
|
||||
|
@ -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/!);
|
||||
|
@ -80,4 +80,4 @@ module Test (/*AUTOARG*/
|
||||
out <= in inside {5'b1_1?1?};
|
||||
end
|
||||
|
||||
endmodule // t
|
||||
endmodule
|
||||
|
Loading…
Reference in New Issue
Block a user