Skip to content

Instantly share code, notes, and snippets.

@vaibhav-s
Forked from blakewest/angular_code_review.md
Last active January 31, 2022 21:39
Show Gist options
  • Save vaibhav-s/e55de8ad2c80f5c1a36d7b3e1eab3596 to your computer and use it in GitHub Desktop.
Save vaibhav-s/e55de8ad2c80f5c1a36d7b3e1eab3596 to your computer and use it in GitHub Desktop.
Angular Code Review Checklist

General

  • Are all vars used somewhere?
  • Do the vars have properly cased, and meaningful names?
  • Style looks appropriate
  • No unnecessarily duplicated logic
  • Code intent is clear upon initial reading
  • Any code that isn't clear, but is needed, has an effective comment
  • Are method calls or attribute lookups every called on entities that could be undefined/null?
  • The functions can appropriately handle unexpected inputs.
  • Commented code has been removed (comments themselves are fine).

Angular Specific

  • No DOM manipulation is happening inside controllers
  • View logic is non-existant or minimal
  • Among the rendering logic, there are no good candidates to be extracted into a filter
  • Among the controller logic, there are no good candidates to be extracted into a service
  • Among all the logic, there are no good candidates to be extracted into a directive
  • Among the partials, there are no good candidates for extraction into an ng-include
  • No unneeded controllers were created.

Final Checks

  • It has indeed passed build tests before getting merged
  • It does what the description says it does
  • Any technical debt has been added to the log.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment