From a3abc73065fc86b33c5f219d83470e6df0b3d947 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 31 Jan 2010 20:40:02 +0200 Subject: [PATCH] * add function size check ('make line30') --- Makefile.am | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile.am b/Makefile.am index 27a8766e..e2968260 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 \