Hi all,
I started a prototype last year, it has a few method and class metrics
https://github.com/alexeieleusis/dart-lang_linter/commits/elastograph, heavily inspired by
NDepend, it is in very early stages and I haven't worked on it for at least 5 months. Still I think the metrics it computes are already useful, I started it with the linter code base for convenience but its use case is so different that I will fork it or start a new project from scratch. If you are really interested in trying it, we can start a conversation offline so I can explain to you how to use it, I need to push code from my working copy.
The following metrics are implemented:
- Class level:
- Depth of inheritance tree.
- Field count.
- Implemented interfaces count.
- Lack of cohesion methods.
- LCOM HS.
- Method count.
- Method level:
- Assignment count.
- Free variables mutation count.
- Mutable variables count.
- Nesting depth.
- Optional parameters count.
- Parameters count.
- Variables count.
- Both levels:
- Afferent coupling.
- Cyclomatic complexity.
- Efferent coupling.
- Statement count.
If you look at the code you will notice that only the method level metrics are on github, this is because I mixed the code with a statistical analysis (on the static analysis report) for a big codebase trying to understand which metrics shed more light on possible bugs. Also there is a bug in the underlying infrastructure (linter or analyzer I don't remember) that prevents some of the metrics from being computed. But as I said above, if you are interested in using it, I can clean it up and push the code to github, I must warn that reading the report is an effort by itself, but there are plans to improve it.
Best
Alexei