Code review checklist
A checklist keeps reviews consistent: the same things get checked whoever is reviewing, and nothing important depends on someone remembering it. Copy the version below into your team’s docs, then trim it to what your codebase actually needs.
The checklist to copy
Paste it into a wiki page or a CONTRIBUTING.md file. It’s written in Markdown, so the boxes turn into checkboxes on GitHub and GitLab.
## Code review checklist ### Before reading the code - [ ] I know what this change is for (description or linked issue) - [ ] It's small enough to review in one sitting - [ ] CI is green ### Design - [ ] The change belongs here, not in another module or library - [ ] It solves today's problem without unused extra options - [ ] It fits how the rest of the system works ### Does it work - [ ] It does what the description says - [ ] Edge cases are handled: empty, missing, very large, duplicate - [ ] Errors are handled and reported, not silently ignored - [ ] Concurrent code can't race or deadlock ### Tests - [ ] New behavior has tests; a bug fix has a test that failed before it - [ ] The tests would fail if the code broke - [ ] Tests don't depend on timing, order or the network ### Security - [ ] Input from users, files and other services is validated - [ ] New endpoints and actions check permissions - [ ] No secrets, keys or personal data in code or logs - [ ] Database queries use parameters; output is escaped - [ ] New dependencies are needed, maintained and pinned ### Performance - [ ] No database or network calls inside loops - [ ] Long lists are paged or streamed ### Readability - [ ] Names say what things are and do - [ ] Comments explain why, not what - [ ] Functions are short enough to follow ### Docs and release - [ ] README, API docs or changelog updated if behavior changed - [ ] Migrations and config changes are noted and can be undone
How to use it
- Read the description first. If you can’t tell what the change is for, ask before reviewing the code. My pull request template guide has four templates that make authors answer that up front.
- Start with design. Google’s public engineering practices guide puts the overall design of a change first, ahead of whether it works, how complex it is, tests, naming, comments, style and docs. A great line-by-line review of the wrong approach still ships the wrong approach.
- Read the tests next. They show what the author thinks the code should do, which makes the code itself faster to check.
- Look at every line people wrote. Generated code, lock files and large data files can be skimmed. Hand-written functions can’t.
- Say when you don’t understand something. If it’s hard for you to follow, the next person to change it will struggle too, and asking for a clearer version is a fair review comment.
- Leave formatting to tools. A formatter and a linter in CI settle style arguments before a person has to.
The author’s checklist, before you ask for review
Most review time is lost on things the author could have caught. This short list fits at the bottom of a pull request template.
- [ ] I read my own diff from top to bottom - [ ] The description says what changed, why, and how I tested it - [ ] Unrelated changes (reformatting, renames) are in a separate pull request - [ ] Tests pass locally and in CI - [ ] Debug output, console logs and commented-out code are gone - [ ] Screenshots are attached for anything visible
Comparing the old and new version of a file side by side is a quick way to spot leftovers; my free file diff tool does that in the browser.
Writing review comments that help
- Comment on the code, not the person. “This function does two jobs” lands better than “you made this too complicated”.
- Explain why. A reason teaches; a bare “change this” only gets one fix.
- Say how much it matters. Mark must-fix problems clearly, and start optional preferences with “Nit:”, the label Google’s guide uses for small points that shouldn’t block a merge.
- Suggest the fix when it’s small. GitHub and GitLab let you propose the exact edit in a comment, which the author can apply with one click.
- Approve when the code is better than before. It doesn’t have to be the way you would have written it.
Turn the checklist into automatic checks
The more of the list a machine checks, the more of the reviewer’s time goes to design and logic.
- Style: a formatter and linter that run in CI.
- Tests: required status checks, so nothing merges while the build is red.
- Reviewers: a
CODEOWNERSfile on GitHub requests a review from the people who own the files that changed. - Your own rules: CodeRabbit (affiliate link), an AI code reviewer, lets you write your team’s rules as path instructions in a
.coderabbit.yamlfile: each rule names a set of files, such as everything undersrc/api/, and says what to look for there. It also readsAGENTS.mdandCLAUDE.mdfiles as review criteria.
A path instruction looks like this:
reviews:
path_instructions:
- path: "src/api/**"
instructions: |
Check that every endpoint validates its input and checks permissions.
If you’re choosing a tool for that first pass, my code review tools comparison covers eight options and what they cost.
Frequently asked questions
What should a code review checklist include?
Design, whether the code does what it should, edge cases and errors, tests, security, performance, readability and docs. Put the most important items first, and leave formatting to automated tools.
Who should review code?
Someone who knows the part of the codebase being changed, plus a specialist for risky areas such as security, payments or privacy. On GitHub, a CODEOWNERS file can request the right people automatically.
Should the checklist go in the pull request template?
Put the short author checklist in the template, so it’s done before review. Keep the longer reviewer checklist in your team’s docs, where it doesn’t clutter every pull request.
Can a tool do the code review for me?
Tools can check style, known bug patterns and many logic problems, and AI reviewers can take a useful first pass. Deciding whether a change is worth making, and signing off on it, is still a person’s job.