diff options
author | Abdullah Sowayan <sowayan@users.noreply.github.com> | 2007-05-31 03:16:02 +0000 |
---|---|---|
committer | Abdullah Sowayan <sowayan@users.noreply.github.com> | 2007-05-31 03:16:02 +0000 |
commit | c168748611b50be740fb4ae605c5855c3245c672 (patch) | |
tree | 50f5ca8737a7e626fcd0414d6e84cae047061075 /ACE | |
parent | b466cc4e8e3b4cbc76f27b3d3b0de31e12314479 (diff) | |
download | ATCD-c168748611b50be740fb4ae605c5855c3245c672.tar.gz |
Thu May 31 03:12:50 UTC 2007 Abdullah Sowayan <abdullah.sowayan@lmco.com>
Diffstat (limited to 'ACE')
-rw-r--r-- | ACE/ChangeLog | 7 | ||||
-rwxr-xr-x | ACE/bin/fuzz.pl | 30 |
2 files changed, 37 insertions, 0 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 25d9cac7efb..0cce2f8d5d9 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,10 @@ +Thu May 31 03:12:50 UTC 2007 Abdullah Sowayan <abdullah.sowayan@lmco.com> + + * bin/fuzz.pl: + + Tabs shouldn't be used as per ACE/TAO/CIAO coding guidlines. + Extended fuzz to detect tabs in the source code. + Wed May 30 00:17:35 UTC 2007 Abdullah Sowayan <abdullah.sowayan@lmco.com> * ace/config-macros.h: diff --git a/ACE/bin/fuzz.pl b/ACE/bin/fuzz.pl index f883e625804..dc763c522a3 100755 --- a/ACE/bin/fuzz.pl +++ b/ACE/bin/fuzz.pl @@ -287,6 +287,34 @@ sub check_for_noncvs_files () } } +# This test checks for the use of tabs, spaces should be used instead of tabs +sub check_for_tab () +{ + print "Running tabs check\n"; + foreach $file (@files_cpp, @files_inl, @files_h, @files_idl) { + if (open (FILE, $file)) { + my $disable = 0; + print "Looking at file $file\n" if $opt_d; + while (<FILE>) { + ++$line; + if (/FUZZ\: disable check_for_tab/) { + $disable = 1; + } + if (/FUZZ\: enable check_for_tab/) { + $disable = 0; + } + if ($disable == 0 and m/^\s*\t/) { + print_error ("$file:$.: tab found"); + } + } + close (FILE); + } + else { + print STDERR "Error: Could not open $file\n"; + } + } +} + # This test checks for the use of "inline" instead of ACE_INLINE sub check_for_inline () @@ -1264,6 +1292,7 @@ if (!getopts ('cdhl:t:mv') || $opt_h) { check_for_inline_in_cpp check_for_id_string check_for_newline + check_for_tab check_for_inline check_for_math_include check_for_line_length @@ -1320,6 +1349,7 @@ check_for_makefile_variable () if ($opt_l >= 1); check_for_inline_in_cpp () if ($opt_l >= 2); check_for_id_string () if ($opt_l >= 1); check_for_newline () if ($opt_l >= 1); +check_for_tab() if ($opt_l >= 1); check_for_inline () if ($opt_l >= 2); check_for_math_include () if ($opt_l >= 3); check_for_synch_include () if ($opt_l >= 6); |