How are maintainability ratings calculated?

First, for every technical debt issue we identify during our 10-point inspection, we estimate a rough time it would take to resolve the problem. We refer to this as remediation time. It’s never perfect, but when viewed as an aggregate we find it’s a useful way to compare technical debt projects.

For files, we assign a letter rating from A to F based on the total remediation time of all of the technical debt issues that are identified. If an issue is classified as “Wontfix” or “Invalid” using our issue statuses, it will not count against the rating.

For repository-level metrics, it’s a bit more sophisticated. Over the years, we’ve found that our old GPAs tend to correlate very strongly with the size of a repository. In other words, large projects almost always score worse than small projects, reducing the value of the metric.

To make the repository-level maintainability rating more relevant, we compute a technical debt ratio, which is the total estimated remediation time divided by a very high level total estimated implementation time, based on repository size. Lower technical debt ratios are better.

Will plugins I run on Code Climate affect my rating?
Maintainability ratings are only influenced by the 10-point technical debt assessments that our system performs, which we’ve spent a long time tuning for accuracy. In order to ensure the integrity of the maintainability ratings, issues emitted by plugins do not affect them. This is something we may revisit in the future.

What will happen to my old GPA and Code Climate badges?
The GPA has been replaced by letter grades on test coverage and maintainability. Code Climate badges that once showed your GPA will now show your repository’s maintainability rating. Our test coverage badges continue to work as they have.

Updated about a month ago

How are maintainability ratings calculated?

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.