Link

Code Reviews

The team lead is responsible for giving the final approval to a pull request, and will usually be the one to merge the pull request in GitHub or the CMS. A developer must request the team lead to review all pull requests. A developer may also choose any other developers to review their code.

If possible, pull requests should be reviewed by the team lead the same day that the Awaiting Review label is added to the pull request. Obviously if the PR is submitted later in the day it can be reviewed the next morning. Because our teams are small and distributed and we are often working on tight deadlines, prompt code reviews are very important.

Developers should ask themselves the following when requesting a code review:

  1. Is this ready for production?
  2. Have I tested for edge cases?
  3. Have I documented my code in comments when necessary?

Code reviewers should ask themselves the following:

  1. Does the feature fulfill the request?
  2. Can I read the code?
  3. Are there any apparent bugs?
  4. Does all of the code adhere to our style guides?

Do any syntax errors jump out? Is a module being used but not imported? It’s easy to miss small things when developing a feature or fixing a bug. We’re here to support each other, so nobody will get offended if you point out a missing semicolon or an extra parentheses.

Always be kind and courteous when giving feedback in a code review. If something can be accomplished in a quicker or cleaner way, include links to documentation that will help the original developer to understand your recommendation.