扫码阅读
手机扫码阅读
一个典型的代码走查检查单
187 2024-10-04
我们非常重视原创文章,为尊重知识产权并避免潜在的版权问题,我们在此提供文章的摘要供您初步了解。如果您想要查阅更为详尽的内容,访问作者的公众号页面获取完整文章。
查看原文:一个典型的代码走查检查单
文章来源:
麦哲思科技任甲林
扫码关注公众号
Code Review Checklist Summary
The primary goal of code review is to identify logical errors within the program, while programming style issues can be checked using style checking tools. The provided checklist is a valuable aid for code review experts to spot such logical errors.
Checklist Items
- Are the code comments consistent with the code itself, and are they necessary?
- Does the code have loops and/or conditions nested more than 3 levels deep?
- Do variable names accurately represent their function?
- Are all loop boundaries correct?
- Are all condition boundaries correct?
- Is there proper handling for exceptional cases of input parameters?
- Are all exceptions within the program handled?
- Does the code contain any duplications?
- Are there methods exceeding 20 lines of code?
- Are there classes containing more than 7 methods?
- Do methods have more than 3 parameters?
- Are there multiple reasons for modifying a class?
- Does a functional change require modifications in multiple classes?
- Are the constants used in the code appropriate?
- Does a method access multiple attributes from other classes?
- Do certain data items always appear together, yet they are not part of a class?
- Can switch statements be replaced by classes?
- Are there classes with very few responsibilities?
- Are there unused attributes or methods in a class?
- Does the code have method calls in the form of a.b().c() within class methods?
- Does a class method always call another class's method with the same name?
- Does a class consistently access another class's attributes and methods?
- Do two classes perform similar tasks with different method names without sharing a common parent class?
- Is a class composed only of fields and simple get/set methods?
- Does a subclass only use some of the parent class's attributes or methods?
想要了解更多内容?
查看原文:一个典型的代码走查检查单
文章来源:
麦哲思科技任甲林
扫码关注公众号
麦哲思科技(北京)有限公司总经理 敏捷性能合弄模型评估师 认证的Scrum Master 认证的大规模敏捷顾问SPC CMMI高成熟度主任评估师 COSMIC MPC,IAC 成员,中国分部主席
425 篇文章
浏览 133.4K
麦哲思科技任甲林的其他文章
量化考核指标的TQC法
大分类小分类KPI计算公式考核规则出发点数据采集方法潜在的问题 结果工期(T) 取值范围:0.6--1.5工期偏差率系数(DVI)(实际工期-计划工期)/计划工期1 若DVI2 若DVI>10%,则工期系数为0.9,DVI>20%则工期系数为0.8,DVI>30%则工期系数为0.7,DVI>40%以上则工期系数为0.6对于
莫要混淆控制限与规格限
有的软件企业实施SPC时,在画控制用控制图时不但在同一张控制图上画了上下的1sigma、2sigma、3sigma线,还画了规格线,其实是画蛇添足,因为规格限如果在上下3sigma内,就失去了控制用控制图的意义。控制限是指通过对历史数据采用控制图(如XbarS图、XMR图)分析得到的,其值与均值偏离上下3sigma,规格限是由客户或者公司指定的,是对过程的能力要求,一般要比控制限宽,否则无
我说CMMI之一:CMMI是什么
我说CMMI之一:CMMI是什么有些朋友没有接触过CMMI,正在学习CMMI,CMMI本身的描述比较抽象,所以,读起来有些费劲。有些朋友实施过CMMI,但是可能存在对CMMI的一些误解,因此我想说说我理解的CMMI,供各位参考。在写这些材料时,我假想我对面坐着一位初学者或者是受错误思想洗过脑的实施过CMMI的受害者,也参考了历史的培训录像。首先我们来讲讲CMMI是什么。CMMI是一个过程框架,给出了一组管理企业的最佳实践。何谓框架?比如我们走在马路上看到一幢正在建设中的高楼,建筑者浇灌了水泥,搭筑了整个大
程序员必读之作:重构
十月一之后安排了我去培训《设计模式》,由于听众多为C与C++的新手,我想先从重构开始讲起,循序渐进,于是我决定仔细阅读〈重构〉这本书。 这本书我很久之前买的,当时大概读了读,感觉不错,就拿给了我表弟去读,他是程序新手。 这次是系统地读。 有个朋友曾经跟我说过,这本书不错,只是有点罗嗦,他是十多年经验的老程序员了,有此感觉很正常。写一个好程序的道理其实就如一层窗户纸,一点就透。但是,难得的是这本书系
缺陷清除率的简单分析
某项目采集了在一个迭代周期内缺陷的注入与发现数据。把缺陷注入分为了3个活动,把缺陷发现分为了4个活动,一个月内的统计数据见下表:某项目的缺陷清除率分析缺陷注入\缺陷发现Sprint planning设计与编码代码评审测试小计需求分析453 12设计与编码 27128测试 22小计4530342缺陷清除率33.3%62.5%96.8%100.0% 在此统计表中并没有采集到产品发布后的度量数据
加入社区微信群
与行业大咖零距离交流学习
软件研发质量管理体系建设
白皮书上线