How does Technical Debt being calculated

Hey @tcsabina

Most issues in SonarQube have a remediation cost attached (estimated time to fix an issue). This could be 1m, 5m, 30m, etc… The sum of all these remediation costs for Code Smells (maintainability issues) for a project is the technical debt.

Does such a quantitative value make sense in a Quality Gate? I don’t think so. A rocket-launcher is probably going to have more technical debt than a calculator. We would rather suggest a Quality Gate condition for the Maintainability Rating.

Maintainability Rating ( sqale_rating )
(Formerly the SQALE rating.) Rating given to your project related to the value of your Technical Debt Ratio. The default Maintainability Rating grid is:

A=0-0.05, B=0.06-0.1, C=0.11-0.20, D=0.21-0.5, E=0.51-1

The Maintainability Rating scale can be alternately stated by saying that if the outstanding remediation cost is:

  • <=5% of the time that has already gone into the application, the rating is A
  • between 6 to 10% the rating is a B
  • between 11 to 20% the rating is a C
  • between 21 to 50% the rating is a D
  • anything over 50% is an E

You can always find Metric Definitions in our docs