* add function size check ('make line30')

This commit is contained in:
Dirk-Jan C. Binnema 2010-01-31 20:40:02 +02:00
parent 22e9d22c17
commit a3abc73065
1 changed files with 10 additions and 0 deletions

View File

@ -28,9 +28,19 @@ cleanupnote:
tags:
gtags
# this warns about function that have a cyclomatic complexity of > 10,
# which is a sign that it needs some refactoring. requires the pmccabe
# tool. If all is fine, it outputs nothing
cc10:
@pmccabe `find -name '*.c' -o -name '*.cc'` | sort -nr | awk '($$1 > 10)'
# this warns about functions that are over 30 non-comment lines long, which is a
# sign that they need some refactoring. requires the pmccabe tool. if
# all is fine, it outputs nothing
line30:
@pmccabe -c `find -name '*.c' -o -name '*.cc'` | sort -nr | awk '($$5 > 30)'
EXTRA_DIST= \
TODO \