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 #: 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 Check function call formats: - pass by value/reference - parameters - use of “const” - no return of reference to local object Check name spelling and use: - is it consistent? - is it within declared scope? - do all structures and classes use '.' reference? Check that all strings: - use std::string class. - have valid and appropriate subscripts. - use correct member functions and operators. Calls Names Strings Pointers Output Format {} Pairs Logic Operators Line by Line Check Standards File Usage Class A Class B Class C N/A (Class A does not use strings) 0 (no defects found) 2,3 (found defects 2 and 3) Check that - pointers are initialized null (0 or NULL) - pointers are deleted only after new, and - new pointers are always deleted after use. Check the output format: - line stepping is proper - spacing is proper Ensure that the {} are proper and matched Verify the proper use of ==, =, ||, and so on. Check every logic function for proper (). Check every LOC for - instruction syntax and - proper punctuation. Ensure that the code conforms to the coding standards. 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.)