Gnocchi calculates complexity on a per function basis. Instead of trying to parse C++ code Gnocchi reads the coverage information produced by GCC. If code is compiled with -fprofile-arcs or -ftest-coverage (depending on compiler version) GCC creates a .gcno file for every object file. Please refer to you GCC manual for details. Gnocchi calculates cyclomatic and the NPATH complexity measures.
13 lines
378 B
Text
13 lines
378 B
Text
$NetBSD: patch-ab,v 1.1.1.1 2009/02/18 19:49:36 marko_schuetz Exp $
|
|
|
|
--- main.cpp.orig 2007-06-26 08:54:52.000000000 -0400
|
|
+++ main.cpp
|
|
@@ -111,7 +111,7 @@ public:
|
|
// std::cout << itr->string() << " " << itr->leaf() << std::endl;
|
|
try
|
|
{
|
|
- map[itr->leaf()] = *itr;
|
|
+ map[itr->path().leaf()] = *itr;
|
|
}
|
|
catch(const std::exception& e)
|
|
{
|