metrics is a software born out of the developer's frustration about available Open Source metrics packages.
There are plenty of them this would not be the problem. But each and every of them has a different focus. Most metrics packages have restrictions towards available metrics and supported languages. Some prominent samples are (CCCC, SLOCCount, PyMetrics, Eclipse-Metrics, Ohcount).
If you know me you are aware of the fact that I might be a package user, maybe a heavy user but never a package maintainer. You know I talk about using other peoples stuff, not writing my own stuff. For me on the other hand the only thing worse than maintaining a package is to use a commercial one. Having said this lets start coding.
One more thing on metrics. Compared to PyMetrics I changed the SLOC metric a lot. PyMetrics was criticised in the past for its SLOC metric. I simplified so something that I do understand as the common denominator for the metric packages mentioned above. This type of metric counts the lines but excludes empty lines and comments. This is sometimes referred to as the source lines of code (SLOC). In literature this is often also referred as physical lines of code.
Another thing I wanted to mention is that I borrowed the sample programming language files for the test cases from Ohcount.