当前位置: 代码迷 >> 综合 >> [敏捷开发实践] 用Sonarqube评估系统中的 Technical Debt (技术债)
  详细解决方案

[敏捷开发实践] 用Sonarqube评估系统中的 Technical Debt (技术债)

热度:61   发布时间:2024-01-15 19:07:11.0

[敏捷开发实践] 用Sonarqube评估系统中的 Technical Debt (技术债)

Sonar中技术债务的计算基于SQALE(Software Quality Assessment based on Lifecycle Expectations,基于生命周期期望的软件质量评估)方法学。

Sonarqude Docs 7.9 https://docs.sonarqube.org/latest/user-guide/concepts/ 中描述的两个指标:

Technical Debt:The estimated time required to fix all Maintainability Issues / code smells

Code Smell:A maintainability-related issue in the code. Leaving it as-is means that at best maintainers will have a harder time than they should making changes to the code. At worst, they'll be so confused by the state of the code that they'll introduce additional errors as they make changes

有兴趣的读者可以看看这个文档:https://docs.sonarqube.org/latest/user-guide/metric-definitions/

Technical Debt (sqale_index)
Effort to fix all Code Smells. The measure is stored in minutes in the database. An 8-hour day is assumed when values are shown in days.

Technical Debt on New Code (new_technical_debt)
Effort to fix all Code Smells raised for the first time in the New Code period.

Technical Debt Ratio (sqale_debt_ratio)
Ratio between the cost to develop the software and the cost to fix it. The Technical Debt Ratio formula is:
Remediation cost / Development cost
Which can be restated as:
Remediation cost / (Cost to develop 1 line of code * Number of lines of code)
The value of the cost to develop a line of code is 0.06 day