What is code review?
Code review is the practice of teammates reading each other's code changes before they're merged, to catch problems and share knowledge. How it works and what makes it good.
On this page
Code review is the practice of one or more developers reading a teammate's code changes before they become part of the main codebase. Reviewers look for bugs, design problems, missing tests and unclear code, and either approve the change or ask for improvements. On GitHub and similar platforms, code review happens on pull requests. It improves quality and spreads knowledge of the codebase across the team.
What reviewers look at
| Area | Questions |
|---|---|
| Purpose | Does the change do what it says, and is it worth doing? |
| Design | Is this the right approach, in the right place? |
| Correctness | Edge cases, errors, behaviour changes |
| Tests | Is the change tested, and would the tests catch a regression? |
| Security | Secrets, permissions, input validation, data handling |
| Readability | Clear names and structure, comments where intent isn't obvious |
A good review works from the big picture down: purpose and design first, details last. See a pull request review checklist.
How it works on GitHub
- The author opens a pull request and requests reviewers.
- Reviewers read the changes on the Files changed tab and leave comments on specific lines.
- Each reviewer submits a review: Approve, Comment or Request changes.
- The author responds and updates the code.
- When required approvals and checks are in place, the pull request is merged.
Why teams review code
- Catch problems early, when they're cheapest to fix.
- Share knowledge, so more than one person understands each part of the system.
- Keep consistency in style and patterns.
- Mentor, as experienced developers explain reasoning and newer ones ask questions.
What makes reviews go well
- Small changes, which reviewers can understand in one sitting.
- Fast turnaround, often a first response within a working day.
- Kind, specific comments about the code, not the person.
- Clear decisions, with optional suggestions labelled as such.
- Automation for the mechanical parts, such as formatting and tests, so humans focus on design.
See code review best practices on GitHub.
An example comment
A vague comment: "This is slow."
A useful comment: "This calls the API once per item in the loop. For large lists that could be hundreds of requests. Could we fetch them in one batch? Happy to pair on it."
The second explains the problem, why it matters and a possible fix, and keeps the tone collaborative.
Code review on small teams
Even a two-person team benefits from review, though it may be lighter: a quick read of each other's changes, or review only for risky areas. Solo developers sometimes review their own pull requests after a break, reading the diff as if someone else wrote it. The habit of looking at a change once more before it merges catches more than you'd expect.
Keeping up with reviews
Reviews slip when the queue isn't visible. Many developers check their review requests at set times, such as after standup and after lunch. OneNotch shows the pull requests waiting for your review in the Mac's notch, with check status and approval counts, and lets you approve one you've finished reviewing with a confirmation step. Reading the code and leaving comments still happens on GitHub. See how to review pull requests faster.
FAQs
How many reviewers should a change have?
Usually one or two who know the code. More reviewers often means slower, shallower reviews.
Is code review only for finding bugs?
No. Sharing knowledge and keeping the codebase consistent are just as important.
How long should a code review take?
Small changes often take minutes. If a review needs an hour, the change may be too big.
What's the difference between approving and requesting changes?
Approving says the change can merge; requesting changes says something must be fixed first.