COEN 286: Code Inspection Checklist
Software Quality Assurance and Testing -- winter, 2004
Prof. John Noll
Santa Clara University
$Id: checklist.body,v 1.3 2004/01/07 19:19:39
jnoll Exp $
- Is each variable correctly typed?
- Is each variable initialized before use?
- Is the initialization appropriate for the type?
- Can global variables be made local?
- Are buffers appropriately sized?
- Are buffer overflows checked?
- Is dynamically allocated memory freed?
- Are appropriate values returned from functions?
- Do function calls have correct parameter types/values?
- Are return values tested?
- Are parameters passed by reference modified correctly?
- Are parameters passed by value not modified?
- Do comparisons use the correct logic?
- Do loops terminate?
- Do all loops iterate the correct number of times (no off-by-one errors)?
- Is behavior correct if a loop is never entered?
- Is there dead (unreachable) code?
- Do all
switch
statements have a default
case?
- Do all
switch
arms have break
statements? If
not, is the ``fall through'' correct?
- Are files opened before use?
- Are files closed after use?
- Are buffers flushed at correct times?
- Are error conditions checked?
Any defect discovered that does not fall into one of the above categories.
Generated Tue Feb 3 17:06:02 2004