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 $

1. Data (DA)

  1. Is each variable correctly typed?
  2. Is each variable initialized before use?
  3. Is the initialization appropriate for the type?
  4. Can global variables be made local?
  5. Are buffers appropriately sized?
  6. Are buffer overflows checked?
  7. Is dynamically allocated memory freed?

2. Interface (IF)

  1. Are appropriate values returned from functions?
  2. Do function calls have correct parameter types/values?
  3. Are return values tested?
  4. Are parameters passed by reference modified correctly?
  5. Are parameters passed by value not modified?

3. Functionality (FN)

  1. Do comparisons use the correct logic?
  2. Do loops terminate?
  3. Do all loops iterate the correct number of times (no off-by-one errors)?
  4. Is behavior correct if a loop is never entered?
  5. Is there dead (unreachable) code?
  6. Do all switch statements have a default case?
  7. Do all switch arms have break statements? If not, is the ``fall through'' correct?

4. Input/Output (IO)

  1. Are files opened before use?
  2. Are files closed after use?
  3. Are buffers flushed at correct times?
  4. Are error conditions checked?

5. Other (OT)

Any defect discovered that does not fall into one of the above categories.

Generated Tue Feb 3 17:06:02 2004