Skip to content

Instantly share code, notes, and snippets.

@HaMster21
Forked from haacked/code-review-checklist.md
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save HaMster21/c9648b150acca0b9bf31 to your computer and use it in GitHub Desktop.

Select an option

Save HaMster21/c9648b150acca0b9bf31 to your computer and use it in GitHub Desktop.
common questions to keep in mind when publishing changes to code

#####General

  • Are all files added that are needed to build the code?
  • Does the change comply to project conventions (naming, repo structure, license, documentation, etc.)?

#####Tests

  • Is the code tested?
  • Are the tests showing the intention how to use the code?
  • Is the expected behavior clear?
  • Are there gaps that also need testing?

#####Functions and Methods

  • Is the name reflecting the behavior / expected result?
  • Are parameters validated, if any?
  • Do parameters make sense? Or is there a way to get rid of them?
  • Does the return value make sense?
  • Is global state changed? Are pure/safe/trusted functions declared as such?
  • Can the function / method take the parameter by reference? Is the parameter mutated?

#####Objects

  • Are referenced ressources cleaned up?
  • Where and when are null references possible? Are those circumstances evaluated and / or tested?
  • Can the ressource be allocated on the stack?
  • Can the livetime and and scope of the ressource be further restricted?

#####Best Practices

  • (DRY) did you use unnecessary repetition?
  • (KISS) can your code be written in a more obvious way? Are functions doing trivial things?
  • (SOLID) are you following SOLID principles?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment