diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2005-01-05 13:19:27 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2005-01-05 13:19:27 +0000 |
commit | ba3eb7df656ac0e0687d9e171d1989d8e66e002f (patch) | |
tree | 2941bea17a8fd0cf7de59e3cab28e0d3cb9da437 /bin | |
parent | 31f8022e12f3ca77e8b8391d384857656e77c607 (diff) | |
download | ATCD-ba3eb7df656ac0e0687d9e171d1989d8e66e002f.tar.gz |
ChangeLogTag: Wed Jan 5 13:19:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/fuzz.pl | 32 |
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); |