zoukankan      html  css  js  c++  java
  • Code review guidelines

    原文:http://www.codeproject.com/Articles/524235/Codeplusreviewplusguidelines

    Checklist for Developers

    Checklist for Developers

    Description

    Confirmed?

    My code compiles  
    My code has been developer-tested and includes unit tests  
    My code includes javadoc where appropriate  
    My code is tidy (indentation, line length, no commented-out code, no spelling mistakes, etc)  
    I have considered proper use of exceptions  
    I have made appropriate use of logging  
    I have eliminated unused imports  
    I have eliminated Eclipse warnings  
    I have considered possible NPEs  
    The code follows the Coding Standards  
    Are there any leftover stubs or test routines in the code?  
    Are there any hardcoded, development only things still in the code?  
    Was performance considered?  
    Was security considered?  
    Does the code release resources? (HTTP connections, DB connection, files, etc)  
    Corner cases well documented or any workaround for a known limitation of the frameworks
    Can any code be replaced by calls to external reusable components or library functions?  
    Thread safety and possible deadlocks  

     Checklist for Reviewers

    Description

    Confirmed?

    Comments are comprehensible and add something to the maintainability of the code  
    Comments are neither too numerous nor verbose  
    Types have been generalized where possible  
    Parameterized types have been used appropriately  
    Exceptions have been used appropriately  
    Repetitive code has been factored out  
    Frameworks have been used appropriately – methods have all been defined appropriately  
    Command classes have been designed to undertake one task only  
    JSPs do not contain business logic  
    Unit tests are present and correct  
    Common errors have been checked for  
    Potential threading issues have been eliminated where possible  
    Any security concerns have been addressed  
    Performance was considered  
    The functionality fits the current design/architecture  
    The code is unit testable  
    The code does not use unjustifiable static methods/blocks  
    The code complies to coding standards  
    Logging used appropriately (proper logging level and details)  
    NPEs and AIOBs
  • 相关阅读:
    [Android Studio 权威教程]Windows下安装Android Studio
    iOS:获取图片Alpha图片
    MFC 直线 虚线 折线 圆 椭圆 矩形 弧形
    大北农董事长夫人莫云为何在美国被逮捕?
    【源代码】LinkedHashMap源代码剖析
    前端那些事儿——中文乱码,网页中文乱码,网页乱码,块元素,内联元素
    Struts2通过自己定义拦截器实现登录之后跳转到原页面
    unity3d ngui-TweenRotation-TweenPosition-TweenScale
    分析函数在数据分析中的应用
    Java Collection
  • 原文地址:https://www.cnblogs.com/Hebe/p/3066987.html
Copyright © 2011-2022 走看看