Wireshark-commits: [Wireshark-commits] rev 40930: /trunk/tools/ /trunk/tools/: checkAPIs.pl

Date: Wed, 08 Feb 2012 14:15:02 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=40930

User: morriss
Date: 2012/02/08 06:15 AM

Log:
 As suggested by Joerg on the -dev list yesterday: count up the number of
 proto_tree_add_text() calls and compare that to the number of
 proto_tree_add_<something else>() calls and complain if more than 50%
 of the calls are add_text()'s.
 
 proto_tree_add_text() calls whose returned proto_item is used are not counted
 as hanging a subtree off a text item is an appropriate use for text items.
 
 I chose 50% because even at that level there are many dissectors with "too many"
 proto_tree_add_text()'s.
 
 The function to do all of this is commented out for now for the same reason
 plus the fact that it's pretty slow.

Directory: /trunk/tools/
  Changes    Path            Action
  +39 -1     checkAPIs.pl    Modified