Code Review Procedure


Contents

Code Review Procedure

Back to Code Review Overview

Formal Code Review

Before Code Review

The Code Review process will likely be triggered by one of the following conditions:

  • After every changeset has been committed by any developer (as policy dictates).
  • After a changeset has been committed by a new developer (as policy dictates).
  • There has been a formal request for code review by the developer or some other party.
  • A developer has loads of free time on his/her hands.
  • A developer feels compelled by the goodness of his/her own sense of doing right in the world.
  • A developer wants to impress other developers with his ninja coding system.
  • A developer wants to impress the ladies – unsure of how this condition would be met doing code reviews, but I digress ...

Process

  1. Send email to Developers List announcing formal code review session.
  2. Select a sample of code to review.
    • Recently committed changeset.
    • Subsystem of the overall project.
  3. Fill out the Code Review Template making sure the scope is well-defined.
  4. Developers wishing to participate should respond to email to announce their interest.
  5. Schedule time to perform code review with developers.
  6. Assign lead developer to take notes and lead the review.
  7. Developers participating in the code review should review code before the meeting.
  8. Make sure that the code compiles.
  9. Make sure that the code passes all tests before code review begins.
  10. Run code through code analyzers before committing it.
    • Enerjy – Eclipse plugin
    • Crucible – web-based code review
  11. Perform code review using Code Review Checklist.
    • Take care not to let the code review turn into a hack-a-thon.
    • The moderator should make sure that the review stays on task.
    • The code review should focus on detecting, NOT fixing bugs.

After Code Review

The following sample actions should be fulfilled once the code review session has been completed.

  • The Code Review Template should be created before process and completed immediately following code review session.
  • The Code Review Template URL should be emailed to all developers for review.
  • Tickets should be created in the appropriate issue tracking system.
  • Any comments or code changes made during the code review should be committed.