博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Code Review的一些注意事项(英文版)
阅读量:2721 次
发布时间:2019-05-13

本文共 1671 字,大约阅读时间需要 5 分钟。

当你进行Code Review的时候,你能很快发现问题吗?你能保证不遗留问题吗?下面是个Check List, 在Code Review结束后看一遍,查漏补缺,有助于吹毛求疵。以前在外企写的,懒得翻译了,大家凑合看吧:

The code review check list

1. Does the task/code for the right project?

2. Does the task created correctly? take care of the Name and Description

3. General Code Smoke Test

    3.1 Pass build, No Error, No warning introduced by new added code

    3.2 Execute as expected

4. Is the code commented? The comments is for reviewer but not for the coder

5. Error Handling

    5.1 Are errors properly handled each time a function returns?

    5.2 Are resources and memory released in all error paths?

    5.3 is the function caller notified when an error is detected?

6. Is allocated memory freed? Even in the error handling path

7. Are all global variables thread-safe?

8. Are locks released in the same order they are obtained?

9. is there any possible deadlock or lock contention?

10. Is there infinite loop?

11. Do recursive functions run within a reasonable amount of stack space?

12. Can the code be optimized?

13. Was the optimization really needed? If it make the code more complex

14. Is the code doing busy waits instead of using synchronization mechanisms or timer events?

15. Are function parameters explicitly verified in the code?

16. Are arrays explicitly checked for out-of-bound indexed?

17. Are variable initialized before they are used?

18. Does a fix made to a function change the behavior of caller functions?

19. Does the bug fix correct all the occurrences of the bug?

20. Is the code doing signed/unsigned conversions? Can sign completion cause problems? Check all unsigned to signed conversions: Can overflow occur?

阅读(5) | 评论(0) | 转发(0) |
0

上一篇:

下一篇:

相关热门文章
评论热议

转载地址:http://eyktd.baihongyu.com/

你可能感兴趣的文章
动态构建LINQ表达式
查看>>
使用ASP.NET Web API和Handlebars的Web模板
查看>>
PowerToys 0.19.0 发布,微软开发的免费实用工具集
查看>>
华为正式开源数据虚拟化引擎 openLooKeng
查看>>
机器学习的三种方法
查看>>
使用ASP.NET Web API和Handlebars的Web模板
查看>>
微服务中的面向切面编程和更多模式
查看>>
十多位全球技术专家,为你献上近十个小时的.Net微服务介绍
查看>>
用于打开和创建SQLite,Microsoft SQL Server,PostgreSQL和MySQL SQL数据库的WPF对话框
查看>>
在Visual Studio中使用C#脚本(CSX脚本)生成代码
查看>>
检查和变异可查询表达式树
查看>>
.NET Core 下使用 Exceptionless 记录日志
查看>>
Facebook 开源 M2M-100,不依赖英语互译百种语言
查看>>
使用UWP人脸检测API在WPF中进行人脸检测
查看>>
如何编写代码解决问题,初学者指南
查看>>
阿里云、蚂蚁开源 Nydus——容器镜像加速服务
查看>>
软件项目失败的心理原因
查看>>
设置Android AI开发环境
查看>>
在Android上将ONNX神经网络模型与TensorFlow Lite结合使用
查看>>
使用Tensorflow Lite创建一个Android AI应用
查看>>