You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
单元测试是用来对一个模块、一个函数或者一个类来进行正确性检验的测试工作,也是提升现网质量的最广泛最简单有效的方式。在实际开发工作中,由于工作繁忙而遗漏或缺乏对单元测试的正确认识,有些开发盲目追求高覆盖率,没有对单元测试做断言,这样的单元测试用例属于无效用例。
该规则包可判断一个测试函数是否有断言,进行单元测试有效性验证。
支持语言:Go
注:该规则包由TCA独立工具支持,需申请授权免费使用,申请传送门:《CLS使用文档》
启用规则包
分析方案 -> 代码检查 -> 依赖漏洞规则包 -> 启用/查看规则
问题示例
欢迎使用!:tada:
关注我们,持续为您的代码助力!
QQ交流群:361791391
公众号(腾讯云静态分析)回复「进群」获取官方微信交流群传送门_
Beta Was this translation helpful? Give feedback.
All reactions