Suppose I have some software project I'm working on, and I want to compute some statistics about it:
- Number of lines (total & per file)
- Comment, spacing and other lines
- Numbers of functions, classes, methods
- Average length of a file, a function, a class, a method
- Cyclomatic complexity
- Dependency DAG depths for files, types etc.
I'll settle for only some of these, of course - the more the merrier. I do not guarantee the repository has any form of source control (although personally I'm working with mercurial right now); and it's not a clone of an online repository (so nothing like gitstats).
- Works on Linux (AMD x86_64 CPUs)
- Supports at the very least C, C++98, C++11
- Support for multiple output formats
- Can produce output as console "ASCII-art" charts (a-la, say,
hg diff --stat)
- Small standalone utility
- Not too many dependencies on other programs and libraries