Skip to content
IT glossary
ProgrammingUpdated December 3, 2026

Code review

Код-ревью

Before a code change is merged, teammates typically read it to check that it solves the intended problem, preserves existing behavior, and will be easy to maintain.

Also known as: ревью кода

What code review is for

Code review is a teammate’s examination of a proposed change. The key question is whether the change does what the task calls for without breaking anything people already rely on. Review also makes it easier for someone other than the author to maintain the code later. You might review a feature, a bug fix, a database migration, or a configuration change. What deserves the most attention depends on what could go wrong: a migration, for example, may need closer scrutiny of how it behaves with existing data.

How a review works

The author usually opens a pull request (PR) that explains the goal, calls out decisions that aren't obvious from the code, and says how the change was tested. The reviewer reads the diff (the lines added, removed, or changed) and looks beyond it when needed. If a function’s return value changes, for instance, check the code that calls it rather than judging the function in isolation.

Review the behavior before polishing the wording or names. Compare the change with the requirements, walk through failure paths and edge cases, and check whether the tests would catch a regression. Then consider whether the code is clear enough for the next person to work on. Reviewers leave feedback, and the author responds or pushes updates. Teams often require both reviewer approval and passing continuous integration (CI) checks before a PR can be merged.

What useful feedback looks like

Suppose a change adds if not items: return to a function that otherwise returns a list. A caller that loops over the result now gets None when there are no items. A useful comment would be: “This branch returns None, so callers that iterate over the result will fail on empty input. Can we return [] here and add a test for that case?” The comment identifies the trigger, the visible consequence, and a way to verify the fix.

Common mistakes

A green CI check means the configured checks passed, not that the change is correct in every situation. Conversely, reading a change is no substitute for running tests. Let formatters handle mechanical style rules so reviewers can spend their time on behavior and design. Keep PRs focused: moving files, reformatting code, and changing behavior in the same PR can make the important differences hard to see.

Separate changes the author must make from optional suggestions. A broken caller is a reason to hold up a merge; a different but equally clear variable name usually isn't. Explain the concern rather than just prescribing your preferred implementation. That leaves room for the author to find a better fix.

In interviews

An interviewer may hand you a short diff and ask what you'd flag. Explain what you think the change is meant to do, then lead with the highest-impact issue. Describe the input or situation that triggers it, what the program does today, and what you'd test after a fix.