summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2010-01-31 20:40:02 +0200
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2010-01-31 20:40:02 +0200
commita3abc73065fc86b33c5f219d83470e6df0b3d947 (patch)
treec5b9097464e2dfb0ed5d44380b38f2c8be8421a2 /Makefile.am
parent22e9d22c17b125004c25cddbc0c86f1bf1fd9951 (diff)
* add function size check ('make line30')
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 27a8766..e296826 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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 \