提高代码质量方法
模式、trick、“最佳实践”。原则,DRY. 设计模式相关书籍
Separation of concern, least knowledge/assumption
《Code Complete》
《Refactoring》
《Clean Code》
《think in java 》,《effective java》,《设计模式》,《代码大全》
学会模块分割
良好的编码风格
bug管理工具
Refactoring
减少圈复杂度
Google的代码规范 http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml。
sonarqube
https://segmentfault.com/a/1190000015458921
CppDepend, SonarQube
google: https://github.com/cpplint/cpplint (Pros: 可以检查runtime/explicit, runtime/references,Cons:这是谷歌的规范)我发现用如下命令过滤掉无用文件G:_codes\cpgf>cpplint --filter=-whitespace,-readability/braces,-build/include_order,-legal/copyright G:_codes\cpgf\src\gmetaclass.cpp)
PVSStudio: https://www.viva64.com/en/b/0457/
CppCheck: http://cppcheck.sourceforge.net/ 用以检查内存泄漏,错配的内存分配和释放,缓冲区溢出,以及更多的问题。https://metrixplusplus.github.io/home.html (No support python3)
https://github.com/terryyin/lizard
https://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis#C,_C++
标准化流程
https://zhuanlan.zhihu.com/p/29231125
自动化是指在代码规范的基础上,使用自动化工具进行质量检查,通常包括:
原文:https://www.cnblogs.com/cutepig/p/12693095.html