diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:30 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:30 +0000 |
commit | c44379cc7d9c7aa113989237ab0f56db12aa5219 (patch) | |
tree | 66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/bin/PythonACE/fuzz/streams_include.py | |
parent | 3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (diff) | |
download | ATCD-c44379cc7d9c7aa113989237ab0f56db12aa5219.tar.gz |
Repo restructuring
Diffstat (limited to 'ACE/bin/PythonACE/fuzz/streams_include.py')
-rw-r--r-- | ACE/bin/PythonACE/fuzz/streams_include.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ACE/bin/PythonACE/fuzz/streams_include.py b/ACE/bin/PythonACE/fuzz/streams_include.py new file mode 100644 index 00000000000..24def75fd66 --- /dev/null +++ b/ACE/bin/PythonACE/fuzz/streams_include.py @@ -0,0 +1,19 @@ +""" Checks for inclusion of a non efficient streams include """ + +import _types +type_list = _types.source_files +_types. header_files + _types.inline_files + +import re + +regex = re.compile ("^\s*#\s*include\s*(\/\*\*\/){0,1}\s*\"ace\/streams\.h\"") +begin_exclude = re.compile ("FUZZ\: disable check_for_streams_include") +end_exclude = re.compile ("FUZZ\: enable check_for_streams_include") + +error_message = ": warning: expensive ace/streams.h included; consider ace/iosfwd.h\n" + +from _generic_handler import generic_handler +def handler (file_name, file_content): + return generic_handler (regex, begin_exclude, + end_exclude, error_message, + file_name, file_content, True) + |