eriklovlie / scaling-octo-bear

Tool to extract complexity metrics from C++ source files.
MIT License
2 stars 0 forks source link

scaling-octo-bear

Wiki

See the wiki for a detailed overview and usage instructions.

About

Very simple tool to extract some basic complexity metrics for C++ source code. Currently only extracts function lengths.

Do we need another tool for style checking?

This depends on what is meant by "style". There are many tools which focus on the superficial stuff (placement of curly braces, the kind of issues most coding standards focus on instead of the important stuff) and static analysis (correctness).

I haven't been able to find a good tool which

These are some other tools out there:

[1] Why haven't the Clang people already made such a tool? The interwebs are full of formatters and translaters, but very few good tools for extracting basic software metrics. Oh well, at least they made a nice library.

Requirements (i.e. what should the tool do):

Building

Follow the steps here to get the llvm and clang sources:

http://clang.llvm.org/docs/LibASTMatchersTutorial.html

Then do this:

cd llvm/tools/clang/tools/extra
git clone https://github.com/eriklovlie/scaling-octo-bear.git complexity-check
echo "add_subdirectory(complexity-check)" >> CMakeLists.txt

Then cd to your build directory and run ninja to build.