projects
/
libav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve detection of non doxy comments.
[libav.git]
/
tools
/
patcheck
diff --git
a/tools/patcheck
b/tools/patcheck
index
9720cb2
..
65beca9
100755
(executable)
--- a/
tools/patcheck
+++ b/
tools/patcheck
@@
-66,6
+66,8
@@
hiegrep '#(el|)if *(0|1)' 'useless #if' $*
hiegrep 'if *\( *(0|1) *\)' 'useless if()' $*
hiegrep '& *[a-zA-Z0-9_]* *\[ *0 *\]' 'useless & [0]' $*
hiegrep '(\( *[0-9] *(&&|\|\|)|(&&|\|\|) *[0-9] *\))' 'overriding condition' $*
hiegrep 'if *\( *(0|1) *\)' 'useless if()' $*
hiegrep '& *[a-zA-Z0-9_]* *\[ *0 *\]' 'useless & [0]' $*
hiegrep '(\( *[0-9] *(&&|\|\|)|(&&|\|\|) *[0-9] *\))' 'overriding condition' $*
+hiegrep '(:\+|,|;)( *|static|\*)*'"$ERE_PRITYP"' *\*( |\*)*(src|source|input|in[^a-z])' 'missing const?' $*
+hiegrep '(:\+|,|;)( *|static|\*)*'"$ERE_PRITYP"' *(src|source|input|in)([0-9A-Z_][0-9A-Za-z_]*){1,} *\[' 'missing const (test2)?' $*
hiegrep2 '\.long_name *=' 'NULL_IF_CONFIG_SMAL' 'missing NULL_IF_CONFIG_SMAL' $*
hiegrep2 '\.long_name *=' 'NULL_IF_CONFIG_SMAL' 'missing NULL_IF_CONFIG_SMAL' $*
@@
-74,7
+76,7
@@
hiegrep2 '\.long_name *=' 'NULL_IF_CONFIG_SMAL' 'missing NULL_IF_CONFIG_SMAL' $*
hiegrep2 "$ERE_TYPES" '(static|av_|ff_|typedef|:\+[^a-zA-Z_])' 'Non static with no ff_/av_ prefix' $*
hiegrep2 "$ERE_TYPES" '(static|av_|ff_|typedef|:\+[^a-zA-Z_])' 'Non static with no ff_/av_ prefix' $*
-hiegrep ':\+[^}]*else' 'missing } prior to else' $*
+hiegrep ':\+[^}
#
]*else' 'missing } prior to else' $*
#FIXME this should print the previous statement maybe
hiegrep ':\+ *{ *$' '{ should be on the same line as the related previous statement' $*
#FIXME this should print the previous statement maybe
hiegrep ':\+ *{ *$' '{ should be on the same line as the related previous statement' $*
@@
-91,7
+93,7
@@
if test -e $TMP ; then
cat $TMP
fi
cat $TMP
fi
-egrep -B2 $OPT '^(\+|) *
'"$ERE_TYPES" $* | egrep -A2 --color=always '(:|-)\+.*[^/]
/(\*([^*]|$)|/([^/]|$))' > $TMP && echo -e "\n Non doxy comments"
+egrep -B2 $OPT '^(\+|) *
('"$ERE_TYPES"'|# *define)' $* | egrep -A2 --color=always '(:|-)\+[^/]*
/(\*([^*]|$)|/([^/]|$))' > $TMP && echo -e "\n Non doxy comments"
cat $TMP
rm $TMP
cat $TMP
rm $TMP