Before we look at how to gather code metrics, we first need to know what they are and why they are useful to us. Code metrics are mainly concerned with software complexity and maintainability. They help us to see how we can improve the maintainability of our source code and reduce source code complexity.
The code metrics that Visual Studio 2019 calculates for you consist of the following:
- Maintainability index: Code maintainability is an essential component ofApplication Lifecycle Management(ALM). Until software reaches its end of life, it must be maintained. The harder the code base is to maintain, the shorter the lifespan of the source code before a complete replacement is required. Writing new software to replace an ailing system is far more work and is more expensive when compared to maintaining an existing system. The measurement for code maintainability is known as the maintainability index...