Covers what a reviewer checks (correctness, design, tests, security, readability), how to write kind and specific comments, labelling blocking versus non-blocking feedback, and how to receive review without defensiveness.
Good review is about finding real problems and sharing knowledge without slowing the team.
The trade-off is thoroughness against flow: block only on what matters, and approve with comments for the rest.
"I treat code review as two jobs: catching problems before they reach production, and spreading knowledge across the team. So I review in priority order. First correctness: does it do what the ticket says, what happens on nulls, empty lists, retries and concurrency? Then security and data: is input validated, is anything personal being logged, is authorisation checked? Then design: does it fit the existing patterns, is the responsibility in the right place? Then tests, and only then readability and naming. Formatting and simple style rules I leave to
dotnet formatand analysers in CI, because a human arguing about brace placement is wasted time.How I word comments matters as much as what I find. I comment on the code, not the person, I give the reason, and I often ask a question rather than issue an order: 'What happens here if the payment gateway times out? I think we'd charge twice on retry.' I label every comment, using something like Conventional Comments: blocking, suggestion, nit, question. That way the author knows exactly what has to change before merge and what's my taste. If the only things left are nits, I approve with comments rather than holding the PR hostage. I also call out good work specifically, because review shouldn't only be a list of faults.
On the receiving side, I assume good intent, reply to every comment, either fixing it or explaining why not, and if a thread goes past two rounds I suggest a ten-minute call and write the outcome back into the PR. The mistake I see is reviewers blocking on personal preference and authors taking comments personally. The goal is better code merged sooner, not winning the thread."
| Priority | Look for | Example comment |
|---|---|---|
| 1. Correctness | Edge cases, nulls, concurrency, error handling | "If items is empty this divides by zero." |
| 2. Security and data | Validation, authorisation, secrets, PII in logs | "This logs the full customer record, including email." |
| 3. Design | Responsibility, coupling, fit with patterns | "Should pricing live in OrderController?" |
| 4. Tests | Behaviour covered, meaningful assertions | "No test for the GST-free case." |
| 5. Readability | Names, structure, comments that explain why | "Process2 doesn't tell me what it does." |
| Label | Meaning | Blocks merge? |
|---|---|---|
| blocking | Bug, security issue, broken contract | Yes |
| suggestion | Better approach; author decides | No |
| nit | Minor style or taste | No |
| question | I don't understand; please explain | Only if the answer reveals a problem |
| praise | This is good, keep doing it | No |
| Harsh | Helpful |
|---|---|
| "This is wrong." | "blocking: this runs a query per line, so 500 lines means 500 round trips. Could we Include them or load in one query?" |
| "Why would you do it like this?" | "question: what made you choose a static helper here? I'm wondering about testing it." |
| "Bad name." | "nit: data could be pendingInvoices, so the loop reads clearly." |
A team I worked with had PRs sitting for two to three days because reviewers blocked on style debates. After adding dotnet format and analysers to CI, adopting comment labels and agreeing on a one-working-day response target, time to first review fell from about 20 hours to about 4, and the number of review rounds per PR dropped from three to one or two.
Checks whether the candidate can find important problems and also work well with people, both as reviewer and as author.
Green flags
Red flags
Review has three outcomes: defects caught before production, shared understanding of the codebase (bus factor), and consistent design. Studies of review at Microsoft found that knowledge transfer and finding better solutions are as valuable as catching bugs, and that most review comments concern maintainability rather than functional defects.
1. Read the description and ticket -> do I understand the goal?
2. Read the tests -> what behaviour is promised?
3. Read the main change -> correctness, security, design
4. Read the rest -> wiring, config, migrations
5. Write comments, label each one
6. Decide: approve / approve with comments / request changes
Reading the tests first gives you the specification before the implementation.
| Concern | Tool |
|---|---|
Formatting, using order, var style |
.editorconfig + dotnet format --verify-no-changes |
| Nullable, async misuse, disposal | Roslyn analysers (CA rules), warnings as errors |
| Vulnerable packages | dotnet list package --vulnerable, Dependabot |
| Coverage on new code, duplication | SonarQube quality gate |
Every automated rule removes a category of human nitpicks.
Written comments lose tone, so neutral text reads as harsh. Techniques that help: talk about the code ("this method") not the person ("you"); use "we"; ask questions when you're unsure; give the reason and, where useful, a suggested fix; and say what's good. Conventional Comments formalises labels like suggestion (non-blocking):.
Separate yourself from the code. Reply to every comment: fixed, or why not. If you disagree, explain once with evidence; if it's still unresolved, talk live and record the outcome. Don't silently ignore comments, and don't resolve someone else's thread without a reply.
A slow review blocks the author, encourages bigger PRs ("might as well add more while I wait") and increases merge conflicts. Google's engineering practices recommend responding within one business day at most. Small PRs plus fast reviews is a reinforcing loop.
.editorconfig rule catch?A review comment on real code, written the way I'd leave it, followed by the change the author made.
// Under review: loads each customer inside the loop.
namespace Billing;
public sealed class InvoiceRunner(BillingDbContext db, IInvoiceSender sender)
{
public async Task RunAsync(CancellationToken ct)
{
var due = await db.Invoices.Where(i => i.Status == InvoiceStatus.Due).ToListAsync(ct);
foreach (var invoice in due)
{
// blocking: this is one query per invoice. With ~3,000 due invoices at month end
// that's 3,000 round trips. Could we load customers with the invoices in one query?
var customer = await db.Customers.SingleAsync(c => c.Id == invoice.CustomerId, ct);
await sender.SendAsync(invoice, customer.Email, ct);
}
}
}
// After review: one query, projected to just what is needed.
namespace Billing;
public sealed class InvoiceRunner(BillingDbContext db, IInvoiceSender sender)
{
public async Task RunAsync(CancellationToken ct)
{
var due = await db.Invoices
.Where(i => i.Status == InvoiceStatus.Due)
.Select(i => new { Invoice = i, i.Customer.Email })
.ToListAsync(ct);
foreach (var item in due)
{
await sender.SendAsync(item.Invoice, item.Email, ct);
}
}
}
Style is enforced by the build, not by reviewers:
dotnet format --verify-no-changes # fails CI if formatting differs from .editorconfig
.editorconfig, dotnet format and analysers in CI.The reviewer has power in the conversation, so the reviewer sets the tone. A senior engineer uses review to teach, not to gatekeep: explaining the why, linking to an example elsewhere in the codebase, and offering to pair when a PR shows someone is stuck. With a junior developer I'll often leave fewer, higher-value comments and fix one example together on a call rather than drop twenty comments on them. I also invite juniors to review my PRs, because reading senior code with permission to ask questions is one of the fastest ways to learn.
Seniors also work at the team and cross-team level. When the same comment appears in several reviews, that's a missing convention: I write it into the team's review guide, an .editorconfig rule or an analyser, so nobody has to write it again. For changes that touch another team's service or a shared library, I add a reviewer from that team and agree the contract in the PR, rather than discovering the disagreement after release.
| Approach | When it fits | Cost | When not to |
|---|---|---|---|
| Async PR review | Most changes | Hours of latency | Urgent fixes or deep design disagreements |
| Pair or mob review | Complex or risky change; onboarding | Two people's time | Trivial changes |
| Two approvers / CODEOWNERS | Security-sensitive, payments or shared code | Slower merges | Everyday code |
| Approve with comments | Only nits or suggestions left | Trusting the author | Blocking issues remain |
I commit an .editorconfig at the repo root with root = true. It holds formatting (indentation, new lines), .NET code style preferences such as file-scoped namespaces, and severities for analyser and code style rules via dotnet_diagnostic.<id>.severity. Visual Studio, VS Code and Rider all read it, so style no longer depends on the editor. To enforce it, I set EnforceCodeStyleInBuild so IDE rules run during dotnet build, and run dotnet format --verify-no-changes in CI.
I'd read it for risk first, style last. Ranked:
SaveChangesAsync (customer told they're signed up when the save can fail), and personal information (email, date of birth) logged and exported unmasked, a Privacy Act issue.string email, Guid IDs), feature envy on Customer, dead code.My rule: block on anything the PR introduces or touches that is a correctness or privacy risk; suggest small fixes in lines the PR changes; log as debt pre-existing structural smells with a ticket that says what they cost. The trade-off is merging safe code today without turning one PR into a rewrite.
Last updated 23 Nov 2026.