diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-01-06 15:08:51 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-01-06 23:11:17 +0000 |
commit | e3eab8391d09c073fd31133aed9c40154ed432fb (patch) | |
tree | af86e57685a21288f279613b2cc9cfa8f74a0fbe /tools/checkAPIs.pl | |
parent | 6e03daf77fb68f6ecab845a16e10357f3358fa99 (diff) | |
download | wireshark-e3eab8391d09c073fd31133aed9c40154ed432fb.tar.gz |
checkAPIs: C++ comments are allowed in Windows resource files.
Change-Id: I3885278bf293b1fd7db812ce265734bcdc904c6f
Reviewed-on: https://code.wireshark.org/review/6354
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'tools/checkAPIs.pl')
-rwxr-xr-x | tools/checkAPIs.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/checkAPIs.pl b/tools/checkAPIs.pl index a55cacded3..e7bd51c739 100755 --- a/tools/checkAPIs.pl +++ b/tools/checkAPIs.pl @@ -2089,6 +2089,7 @@ while ($_ = $ARGV[0]) my $fileContents = ''; my @foundAPIs = (); my $line; + my $prohibit_cpp_comments = 1; if ($source_dir and ! -e $filename) { $filename = $source_dir . '/' . $filename; @@ -2104,6 +2105,11 @@ while ($_ = $ARGV[0]) print STDERR "Warning: $filename is not of type file - skipping.\n"; next; } + + # Establish or remove local taboos + if ($filename =~ m{ ui/qt/ }x) { $prohibit_cpp_comments = 0; } + if ($filename =~ m{ image/*.rc }x) { $prohibit_cpp_comments = 0; } + # Read in the file (ouch, but it's easier that way) open(FC, $filename) || die("Couldn't open $filename"); $line = 1; @@ -2164,7 +2170,7 @@ while ($_ = $ARGV[0]) #$errorCount += check_ett_registration(\$fileContents, $filename); - if ($filename !~ m{ ui/qt/ }x && $fileContents =~ m{ \s// }xo) + if ($prohibit_cpp_comments && $fileContents =~ m{ \s// }xo) { print STDERR "Error: Found C++ style comments in " .$filename."\n"; $errorCount++; |