DEV Community

That Blair Guy
That Blair Guy

Posted on • Originally published at chaosandpenguins.com

Code review checklist

Recently, I've been doing code reviews for a group of junior devs. I'm pleased to have the opportunity, but I find we're spending more time on fundamentals than the actual stories.

To address this, I've put together a checklist of things to check before submitting your code to be reviewed. It's not meant to be exhaustive, just a short list intended to help us spend less time reviewing the basics and more on the parts the basics are supporting.

Are there other items you'd include on this list?

  • Is the code up to date with master?
  • Does the code run? Do all the tests pass? (This also means no "expected failures.")
  • Do all the classes and methods have comments?
  • Have you removed all of your "debugging" code (e.g. System.out, console.log, or other platform equivalent).
  • There should not be any outstanding changes from previous reviews.
  • There should not be changes which aren’t part of the specific ticket you're working on.
  • There should be no blocks of commented out code.

Top comments (3)

Collapse
 
alvesvalentin profile image
Alvès Valentin

interesting, when i did my internship we had team-wide code reviews, we (another junior and myself) had some difficulties to be active in the code reviews because we felt we had not the experience to point out some "defects" in the code. My mentor made us some exercises where we reviewed old code of us the purpose of the exercise is to show that we are as much legit in reviews than other more experienced developers and we made a "Code Review cheatsheet" to help us in further reviews. I could write an article about it if people are interested (mostly talking to juniors, i know how you feel )

Collapse
 
fwuensche profile image
Flavio Wuensche

One suggestion: is the code tested? 😉

Collapse
 
thatblairguy profile image
That Blair Guy

Yep, that's a good addition!

Thanks!