summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2005-01-05 13:19:27 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2005-01-05 13:19:27 +0000
commit2c38fe86127d33dcdfc9d2d27af1c25eccc208a9 (patch)
tree2941bea17a8fd0cf7de59e3cab28e0d3cb9da437
parent813c4f922adb4823b2217833bdc1a81b4e325227 (diff)
downloadATCD-2c38fe86127d33dcdfc9d2d27af1c25eccc208a9.tar.gz
ChangeLogTag: Wed Jan 5 13:19:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
-rwxr-xr-xbin/fuzz.pl32
1 files changed, 31 insertions, 1 deletions
diff --git a/bin/fuzz.pl b/bin/fuzz.pl
index fd9142d61e8..d61b3ca499c 100755
--- a/bin/fuzz.pl
+++ b/bin/fuzz.pl
@@ -126,7 +126,7 @@ sub store_file ($)
elsif ($name =~ /\.(mpc|mwc|mpb|mpt)/i) {
push @files_mpc, ($name);
}
- elsif ($name =~ /\.(icc|ncb|opt)$/i) {
+ elsif ($name =~ /\.(icc|ncb|opt|zip)$/i) {
push @files_noncvs, ($name);
}
}
@@ -491,6 +491,35 @@ sub check_for_preprocessor_comments ()
}
}
+# We should not have empty inline files in the repo
+sub check_for_empty_inline_files ()
+{
+ print "Running empty inline files test\n";
+ foreach $file (@files_inl) {
+ my $found = 0;
+ my $ignore = 0;
+ if (open (FILE, $file)) {
+ print "Looking at file $file\n" if $opt_d;
+ while (<FILE>) {
+ if (/\/\/ TAO and the TAO IDL Compiler have been developed by/) {# skip IDL generated files
+ $ignore = 1;
+ next;}
+ next if /^[:blank:]*$/; # skip empty lines
+ next if /^[:blank:]*\/\//; # skip C++ comments
+ $found = 1;
+ }
+ close (FILE);
+ if ($found == 0 and $ignore == 0) {
+ print_error ("File $file is empty and should not be in the "
+ ."repository");
+ }
+ }
+ else {
+ print STDERR "Error: Could not open $file\n";
+ }
+ }
+}
+
# This test checks for the use of the Win32 Unicode string defines
# or outdated ASYS_* macros
@@ -1319,6 +1348,7 @@ if ($opt_t) {
print "--------------------Configuration: Fuzz - Level ",$opt_l,
"--------------------\n";
+check_for_empty_inline_files () if ($opt_l >= 1);
check_for_msc_ver_string () if ($opt_l >= 6);
check_for_noncvs_files () if ($opt_l >= 1);
check_for_streams_include () if ($opt_l >= 6);