Table C58 C++ Code Review Checklist



Table C58: Code Review Checklist (MSOE skeleton version for C++)

Purpose: To guide you in conducting an effective code review.

As you complete each review step, indicate N/A if the condition does not exist in the code for that class, 0 or no errors of that type exist, or the ID of the defect (from the defect log) corresponding to the error (see example below).

Complete the checklist for each class before you start to review the next class.

PROGRAM NAME AND #:

| | |Class A |Class B |Class C |

|Complete |Verify that the code implements the complete design. | | | |

|#includes |Verify that #includes are complete | | | |

|Initialization |Check variable and parameter initialization: | | | |

| |- at program initiation | | | |

| |- at start of every loop | | | |

| |- at function/procedure entry | | | |

|Calls |Check function call formats: | | | |

| |- pass by value/reference | | | |

| |- parameters | | | |

| |- use of “const” | | | |

| |- no return of reference to local object | | | |

|Names |Check name spelling and use: | | | |

| |- is it consistent? | | | |

| |- is it within declared scope? | | | |

| |- do all structures and classes use '.' reference? | | | |

|Strings |Check that all strings: |N/A |0 |2,3 |

| |- use std::string class. |(Class A does not |(no defects found)|(found defects 2 |

| |- have valid and appropriate subscripts. |use strings) | |and 3) |

| |- use correct member functions and operators. | | | |

|Pointers |Check that | | | |

| |- pointers are initialized null (0 or NULL) | | | |

| |- pointers are deleted only after new, and | | | |

| |- new pointers are always deleted after use. | | | |

|Output Format |Check the output format: | | | |

| |- line stepping is proper | | | |

| |- spacing is proper | | | |

|{} Pairs |Ensure that the {} are proper and matched | | | |

|Logic Operators |Verify the proper use of ==, =, ||, and so on. | | | |

| |Check every logic function for proper (). | | | |

|Line by Line Check |Check every LOC for | | | |

| |- instruction syntax and | | | |

| |- proper punctuation. | | | |

|Standards |Ensure that the code conforms to the coding standards. | | | |

|File Usage |Verify that all files are | | | |

| |- properly declared, | | | |

| |- opened (normally at declaration), | | | |

| |- closed (often automatic at destruction). and | | | |

| |- correctly tested for end-of-file, where necessary | | | |

(Adapted from Watts Humphrey’s PSP C58 form; used with permission per textbook.)

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download