首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何为SQALE修正函数为线性的规则设置技术债务?

如何为SQALE修正函数为线性的规则设置技术债务?
EN

Stack Overflow用户
提问于 2015-05-19 19:00:40
回答 1查看 297关注 0票数 0

我试图将技术债务问题与SQALE补救函数是线性的规则进行比较。我把https://github.com/SonarCommunity/sonar-css/blame/master/css-checks/src/main/java/org/sonar/css/checks/ImportNumberThreshold.java#L71换成了

代码语言:javascript
复制
CheckMessage checkMessage = new CheckMessage(this,
    "Reduce the number of @import. This sheet imports {0,number,integer} other sheets, "
      + "{1,number,integer} more than the {2,number,integer} maximum.", currentImportCount,
    currentImportCount - DEFAULT_THRESHOLD, DEFAULT_THRESHOLD);
  checkMessage.setCost(1000.0);
  getContext().log(checkMessage);

但它没有将技术债务设置为1000分钟。无论超过限制的导入数量如何,每期的技术债务都保持为10分钟。

在我的测试文件中,下面的断言是绿色的:

代码语言:javascript
复制
   CheckMessagesVerifier.verify(file.getCheckMessages()).next()
  .withMessage("Reduce the number of @import. This sheet imports 32 other sheets, 1 more than the 31 maximum.")
  .withCost(Double.valueOf(1000.0))
  .noMore();

我遗漏了什么?

谢谢你的帮忙!

EN

回答 1

Stack Overflow用户

发布于 2015-05-22 23:39:27

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30323763

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档