Permalink
Browse files

* add function size check ('make line30')

  • Loading branch information...
1 parent 22e9d22 commit a3abc73065fc86b33c5f219d83470e6df0b3d947 @djcb committed Jan 31, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 Makefile.am
View
@@ -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 \

0 comments on commit a3abc73

Please sign in to comment.