What mehen emits
Formulas
Original (Oman & Hagemeister, 1992)
V_avg, CC_avg, LOC_avg are averages across the unit.
Visual Studio (rescaled 0–100)
Microsoft rescaled MI to a 0–100 range so a single threshold could be applied across files:SEI (with comment ratio)
The SEI variant adds a documentation term:CM is the ratio of comment lines to total lines.
How to read it
Visual Studio uses these thresholds out of the box.
References
- Oman, P. & Hagemeister, J. (1992). Metrics for assessing a software system’s maintainability. Proc. Conf. on Software Maintenance. DOI.
- Coleman, D., Ash, D., Lowther, B. & Oman, P. (1994). Using metrics to evaluate software system maintainability. Computer 27(8): 44–49. DOI.
- Welker, K. D. (2001). The Software Maintainability Index Revisited. CrossTalk — The Journal of Defense Software Engineering, August 2001. PDF (DTIC archive).
- Microsoft: Code metrics — Maintainability Index range and meaning.
- Radon: Maintainability Index reference implementation.
See also
- Halstead metrics — input for MI.
- Cyclomatic complexity — input for MI.
- LOC family — SLOC and CLOC are inputs.