Index: trunk/util/devhelpers/comment_hunt.sh =================================================================== --- trunk/util/devhelpers/comment_hunt.sh (nonexistent) +++ trunk/util/devhelpers/comment_hunt.sh (revision 20662) @@ -0,0 +1,34 @@ +#!/bin/sh + +# Hunt for comments that are longer than $1 in all file names specified after +# $1. Useful for detecting documentation that should be migrated from code to +# doc/ + +hunt() +{ +awk -v "THR=$1" -v "fn=$2" ' +(open) { comment = comment $0 "\n"; cnt++ } + +/\/[*]/ && (!open) { + open=1 + cnt=1 + comment=$0 "\n" +} + +/[*]\// && (open) { + if ((cnt > THR) && (!(comment ~ "MERCHANTABILITY"))) + print fn "::" cnt "::" comment + open=0 + cnt=0 + comment="" +} + +' < $2 +} + +THR=$1 +shift 1 +for n in $* +do + hunt $THR $n +done Property changes on: trunk/util/devhelpers/comment_hunt.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property