Code Review Check List

本文提供了一份详尽的代码审查清单,旨在帮助开发者确保代码项目的正确性、可读性和安全性。清单覆盖了从任务定义到错误处理、内存管理、线程安全等关键环节,帮助开发者在编码过程中遵循最佳实践,提高代码质量。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 inroduced by new added code

3.2 Execute as expected

4 Is the code commented? The comments is for reviewr 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 funtion 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 funtion 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?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值