夹板和测试覆盖率分析?
我正在寻找一种具有成熟的夹板的静态分析工具,它还可以对代码进行测试覆盖率分析。 例如,libfoo.c 中的所有非静态函数都应该出现在 libfoo.h 中,因此 libfoo.h 中的所有函数都应该具有单元测试。
当然,这种行为需要某种粒度控制,但这将在静态分析工具的某种启动配置文件中定义。
我正在开发一个进展非常快的项目,每天都会添加各种东西,我希望找到一些静态分析工具来帮助确保单元测试覆盖率保持足够。 它是一个大型的、地理上分散的团队,这意味着事情会 24/7 提交,我需要每晚构建变得更聪明。
我不需要它非常智能,我只需要它在未测试某些内容时破坏构建,除非它明确超出范围。
CCAN 正在研究类似的东西,但需要几个月的时间才能编写出任何实质性内容。 我还需要一些成熟的东西。
预先感谢您提供任何宝石的链接。
I'm looking for a static analysis tool with the maturity of splint that also produces test coverage analysis of the code. For instance, all non-static functions in libfoo.c should be present in libfoo.h, by that token all functions in libfoo.h should have unit tests.
Of course, such behavior would need some kind of granular control, but this would be defined in some kind of start up configuration file for the static analysis tool.
I'm working on a project that is moving very quickly, all kinds of stuff is being added daily, I'm hoping to find some static analysis tool that helps ensure unit test coverage remains adequate. Its a large, geographically distributed team which means stuff gets committed 24/7, I need nightly builds to be smarter.
I don't need it to be super smart, I just need it to break the build if something isn't being tested, unless its explicitly taken out of scope.
CCAN is working on something similar, however its going to be months before anything substantial is written. I also need something mature.
Thanks in advance for links to any gems.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
GCC 文档将读者引导至 gcov 进行代码覆盖率分析。 这篇 2005 年 Dobbs 博士关于防御性编程的文章包括对使用 gcov 的讨论。
The GCC documentation points the reader to gcov for code coverage analysis. This 2005 Dr. Dobbs article on Defensive programming includes a discussion of using gcov.
您可能有兴趣查看:什么是清理代码的最佳命令行工具? 我不知道它是否有帮助,但那里有很多很好的建议。
You may be interested in checking out: What is the best command-line tool to clean up code? I don't know if it will help, but there are many great suggestions on there.