<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Awesome Code Review RSS Feed]]></title><description><![CDATA[All about code reviews: code review best practices, pull request practices, code review checklists, and code review  workshops, courses and training.]]></description><link>https://www.awesomecodereviews.com</link><generator>GatsbyJS</generator><lastBuildDate>Wed, 29 Jul 2026 11:18:02 GMT</lastBuildDate><item><title><![CDATA[Datadog Code Security for automated code reviews]]></title><description><![CDATA[Datadog Code Security brings application-security findings
into IDEs, continuous integration, and pull requests. For code reviews, its main…]]></description><link>https://www.awesomecodereviews.com/automation/datadog-code-security/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/automation/datadog-code-security/</guid><pubDate>Fri, 24 Jul 2026 07:59:30 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://docs.datadoghq.com/security/code_security/&quot;&gt;Datadog Code Security&lt;/a&gt; brings application-security findings
into IDEs, continuous integration, and pull requests. For code reviews, its main capability is Static Code
Analysis (SAST), which reports security vulnerabilities and code-quality problems before a change reaches
production.&lt;/p&gt;
&lt;h2&gt;How Datadog helps during code review&lt;/h2&gt;
&lt;p&gt;Datadog Static Code Analysis scans source code for security vulnerabilities and quality problems before the code
reaches production. Teams can run scans on Datadog’s infrastructure or in CI with the &lt;code class=&quot;language-text&quot;&gt;datadog-ci&lt;/code&gt; CLI. Datadog
applies default language-specific rulesets, which teams can customize in the platform or in a
&lt;code class=&quot;language-text&quot;&gt;code-security.datadog.yaml&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;During a code review, Datadog can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add inline comments for new SAST findings on pull requests in supported source-control systems.&lt;/li&gt;
&lt;li&gt;Report code vulnerabilities separately from quality findings such as error-prone code, performance problems,
style violations, and poor practices.&lt;/li&gt;
&lt;li&gt;Provide deterministic or AI-generated suggested fixes when available.&lt;/li&gt;
&lt;li&gt;Create status checks that teams can use as pull-request gates.&lt;/li&gt;
&lt;li&gt;Associate findings with Datadog services and teams, helping route remediation work to an owner.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The current &lt;a href=&quot;https://docs.datadoghq.com/security/code_security/static_analysis/&quot;&gt;Datadog SAST documentation&lt;/a&gt;
describes the supported languages, integrations, rules, and remediation options.&lt;/p&gt;
&lt;h2&gt;Pull-request comments and gates&lt;/h2&gt;
&lt;p&gt;Datadog supports inline SAST comments on cloud-hosted GitHub, GitLab, and Azure DevOps repositories. Teams can set
minimum severity thresholds and exclude some lower-value findings, such as results in test files. Suggested fixes
can be applied from a pull request when Datadog has a fix for the rule.&lt;/p&gt;
&lt;p&gt;PR Gates are a separate enforcement mechanism. A gate can fail when modified lines introduce a new vulnerability
or quality violation at a configured severity. Datadog creates the check, but the repository administrator must
make that check required in GitHub or Azure DevOps before it blocks a merge. Gates can also use findings from
software composition analysis, code coverage, infrastructure-as-code scanning, secret scanning, and flaky-test
detection.&lt;/p&gt;
&lt;p&gt;This focus on newly introduced problems is useful during review because an existing backlog does not have to block
every pull request. See Datadog’s
&lt;a href=&quot;https://docs.datadoghq.com/pr_gates/&quot;&gt;PR Gates documentation&lt;/a&gt; for the supported gate types and restrictions.&lt;/p&gt;
&lt;h2&gt;IDE feedback and remediation&lt;/h2&gt;
&lt;p&gt;Datadog extensions for Visual Studio Code and JetBrains IDEs can run static analysis while a developer edits code.
That shortens the feedback loop by finding some violations before a pull request is opened.&lt;/p&gt;
&lt;p&gt;For supported findings, Datadog distinguishes between deterministic fixes generated from rule templates and
AI-suggested fixes for more complex violations. With the necessary GitHub App permissions, a developer can open a
fix pull request from Datadog or commit a suggested fix to the current branch. These changes are proposals, not
proof that a vulnerability is resolved; reviewers should inspect the patch and run the relevant tests.&lt;/p&gt;
&lt;h2&gt;Important limitations&lt;/h2&gt;
&lt;p&gt;Datadog’s pull-request comments and PR Gates are not supported for public repositories or for pull requests from a
fork into a different repository. This makes the workflow a poor fit for many open-source projects.&lt;/p&gt;
&lt;p&gt;Datadog Code Security is a broader platform rather than a lightweight standalone analyzer. It is strongest for
organizations already using Datadog that want code findings, ownership, and production context in one system. A
team that only needs a formatter, linter, or standalone static analyzer may find a smaller tool easier to operate.&lt;/p&gt;
&lt;p&gt;Finally, static analysis only detects the patterns covered by its rules and analysis engines. It does not replace
human review of requirements, design, business logic, tests, or operational risk.&lt;/p&gt;
&lt;h2&gt;Should you use Datadog for code review?&lt;/h2&gt;
&lt;p&gt;Datadog has a credible automated code-review workflow: SAST findings can reach developers in their IDE, CI
pipeline, and pull requests, while gates can prevent selected new issues from being merged. The main reasons to
choose it are its broader security coverage and its connection to Datadog’s service and runtime context.&lt;/p&gt;
&lt;p&gt;If those capabilities are more than your team needs, compare the
&lt;a href=&quot;/automation/automated-code-reviews/&quot;&gt;best automated code review tools&lt;/a&gt; or consider
&lt;a href=&quot;/automation/codeql/&quot;&gt;CodeQL&lt;/a&gt; for GitHub-native security scanning.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Datadog Code Security for automated code reviews”: &lt;a href=&quot;https://www.awesomecodereviews.com/automation/datadog-code-security/&quot;&gt;https://www.awesomecodereviews.com/automation/datadog-code-security/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2026-07-24T09:59:30+02:00&quot;&gt;July 24, 2026&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Overview of Code Review Research]]></title><description><![CDATA[A curated, evidence-aware map of research on modern code review, pull-request review, and closely related change-based inspection practices…]]></description><link>https://www.awesomecodereviews.com/research/code-review-research-overview/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/research/code-review-research-overview/</guid><pubDate>Fri, 24 Jul 2026 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;A curated, evidence-aware map of research on modern code review, pull-request review, and closely related change-based inspection practices.&lt;/p&gt;
&lt;p&gt;This list can also be found and contributed to on &lt;a href=&quot;https://github.com/mgreiler/awesome-code-review-research&quot;&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Papers are assigned to one primary topic to keep the list readable. Many papers are relevant to several topics; secondary topics are shown as tags.&lt;/p&gt;
&lt;p&gt;Missing important research? Open a pull request and include the publication status, venue, study design and scope, and a one-sentence finding.&lt;/p&gt;
&lt;h2&gt;How to read this list&lt;/h2&gt;
&lt;h3&gt;Publication status&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PR&lt;/strong&gt; — Peer-reviewed and published.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Accepted&lt;/strong&gt; — Accepted by a peer-reviewed venue; the final issue or proceedings entry may still be pending.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Preprint&lt;/strong&gt; — Public manuscript without confirmed peer-reviewed publication.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Grey literature&lt;/strong&gt; — Industry analysis, blog post, report, or other non-peer-reviewed work.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Evidence profile&lt;/h3&gt;
&lt;p&gt;Citation count is not a measure of validity. This list therefore reports both the &lt;strong&gt;study design/scope&lt;/strong&gt; and an approximate &lt;strong&gt;citation-influence band&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Common evidence profiles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Systematic review&lt;/strong&gt; — Synthesizes a defined body of prior research.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Large industrial study&lt;/strong&gt; — Uses substantial data or deployment evidence from one or more companies.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multi-project archival study&lt;/strong&gt; — Analyses repositories, reviews, or pull requests across several projects.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Controlled experiment&lt;/strong&gt; — Manipulates conditions to support stronger causal claims within the experimental setting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mixed methods&lt;/strong&gt; — Combines quantitative and qualitative evidence.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qualitative study&lt;/strong&gt; — Interviews, observations, or qualitative analysis intended to explain mechanisms and experiences.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tool or benchmark evaluation&lt;/strong&gt; — Evaluates an automated technique, dataset, or model.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Citation influence&lt;/h3&gt;
&lt;p&gt;Citation bands are approximate snapshots checked in July 2026. Counts differ across Google Scholar, OpenAlex, Semantic Scholar, Scopus, and publisher pages, so they should be treated as a rough indicator of influence only. For a public repository, record one consistent source—preferably OpenAlex—and automate annual refreshes.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;★★★★★&lt;/strong&gt; — 500+ citations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;★★★★&lt;/strong&gt; — 200–499 citations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;★★★&lt;/strong&gt; — 50–199 citations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;★★&lt;/strong&gt; — 10–49 citations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;★&lt;/strong&gt; — 1–9 citations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NEW&lt;/strong&gt; — Too recent for citation count to be meaningful&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;—&lt;/strong&gt; — Not checked&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For maintainability, use one citation source consistently—preferably OpenAlex—and record the source and retrieval date in generated metadata.&lt;/p&gt;
&lt;h2&gt;Topic taxonomy&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Topic&lt;/th&gt;
&lt;th&gt;Main questions&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Field overviews and taxonomies&lt;/td&gt;
&lt;td&gt;What has been studied, how is the field structured, and where are the gaps?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Practices, process, and organizational context&lt;/td&gt;
&lt;td&gt;How do teams perform code review, and how do practices differ across organizations?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Outcomes, effectiveness, and value&lt;/td&gt;
&lt;td&gt;What does code review detect or improve, and under which conditions?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reviewability, cognition, and change design&lt;/td&gt;
&lt;td&gt;How do change size, ordering, tests, explanations, and presentation affect reviewers?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reviewer selection, participation, workload, and latency&lt;/td&gt;
&lt;td&gt;Who reviews, how quickly, and what affects participation or delays?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Human factors, communication, conflict, and inclusion&lt;/td&gt;
&lt;td&gt;How do social dynamics, emotions, identity, and communication affect review?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Security-focused code review&lt;/td&gt;
&lt;td&gt;Which security defects are detected or missed, and how can detection improve?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Static analysis, bots, and traditional automation&lt;/td&gt;
&lt;td&gt;Which review tasks can be automated or supported without generative AI?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI- and LLM-assisted code review&lt;/td&gt;
&lt;td&gt;How well do LLM-based reviewers work, and how do they change human workflows?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Special contexts&lt;/td&gt;
&lt;td&gt;How does code review work in research software, education, or other specific environments?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h1&gt;Recent peer-reviewed research: 2024–2026&lt;/h1&gt;
&lt;p&gt;These papers are separated because recent work may be highly relevant despite having few citations. “Recent” is based on publication years 2024–2026; online-first and proceedings dates can differ.&lt;/p&gt;
&lt;h2&gt;Field overviews and automation assessments&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3800963&quot;&gt;A Roadmap for Modern Code Review: Challenges and Opportunities&lt;/a&gt; — Yang et al., &lt;em&gt;ACM Transactions on Software Engineering and Methodology&lt;/em&gt;, 2026. &lt;strong&gt;PR · Systematic roadmap · NEW · Tags: taxonomy, AI, future research.&lt;/strong&gt; Consolidates research from 2013–2025 into understanding studies and improvement techniques, and identifies context-aware, value-driven, and human-centred directions for AI-era review.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/TSE.2023.3348172&quot;&gt;Code Review Automation: Strengths and Weaknesses of the State of the Art&lt;/a&gt; — Tufano et al., &lt;em&gt;IEEE Transactions on Software Engineering&lt;/em&gt;, 2024. &lt;strong&gt;PR · Comparative tool evaluation · ★★★ (~100) · Tags: automation, benchmarks, deep learning.&lt;/strong&gt; Shows that automation performance varies substantially by task and evaluation setup, and that strong benchmark results do not by themselves establish production readiness.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;AI- and LLM-assisted code review&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3664646.3665664&quot;&gt;AI-Assisted Assessment of Coding Practices in Modern Code Review&lt;/a&gt; — Vijayvergiya et al., &lt;em&gt;AIware&lt;/em&gt;, 2024. &lt;strong&gt;PR · Large industrial deployment · ★★★ (~65) · Tags: LLM, coding practices, Google.&lt;/strong&gt; Reports that an LLM-based reviewer can generate useful coding-practice comments at industrial scale, while requiring careful filtering, feedback loops, and integration into existing review workflows.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/ICSE55347.2025.00060&quot;&gt;Deep Learning-Based Code Reviews: A Paradigm Shift or a Double-Edged Sword?&lt;/a&gt; — Tufano et al., &lt;em&gt;ICSE&lt;/em&gt;, 2025. &lt;strong&gt;PR · Controlled experiment with 29 experienced developers and more than 50 review hours · ★★ (~17) · Tags: LLM assistance, attention, defect severity.&lt;/strong&gt; LLM suggestions shifted reviewers’ attention toward suggested locations and increased detection of low-severity issues, but did not improve detection of high-severity issues, save time, or increase confidence.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/ICSE-SEIP66354.2025.00043&quot;&gt;Automated Code Review in Practice&lt;/a&gt; — Cihan et al., &lt;em&gt;ICSE Software Engineering in Practice&lt;/em&gt;, 2025. &lt;strong&gt;PR · Multi-project industrial mixed methods · ★★ (~34) · Tags: LLM, adoption, outcomes.&lt;/strong&gt; Across practitioner feedback and deployed projects, automated comments were frequently resolved and produced small quality gains, but also introduced irrelevant comments and did not automatically shorten review cycles.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/CHASE66643.2025.00016&quot;&gt;Human and Machine: How Software Engineers Perceive and Engage with AI-Assisted Code Reviews Compared to Their Peers&lt;/a&gt; — Alami and Ernst, &lt;em&gt;CHASE&lt;/em&gt;, 2025. &lt;strong&gt;PR · Qualitative study, 20 interviews · ★★ (~30) · Tags: trust, cognitive load, emotional load.&lt;/strong&gt; Developers reported less emotional-regulation effort with LLM reviewers, but sometimes more cognitive load from verbose feedback; adoption remained constrained by trust and missing context.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/ESEM64174.2025.00013&quot;&gt;Rethinking Code Review Workflows with LLM Assistance: An Empirical Study&lt;/a&gt; — Aðalsteinsson et al., &lt;em&gt;ESEM Industry Track&lt;/em&gt;, 2025. &lt;strong&gt;PR · Industrial field study and experiment · NEW · Tags: workflow, trust, change complexity.&lt;/strong&gt; Developers particularly valued AI-led review for large or unfamiliar changes, but false positives and insufficient repository context limited confidence and adoption.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3721127&quot;&gt;Accountability in Code Review: The Role of Intrinsic Drivers and the Impact of LLMs&lt;/a&gt; — Alami et al., &lt;em&gt;ACM Transactions on Software Engineering and Methodology&lt;/em&gt;, 2025. &lt;strong&gt;PR · Qualitative and conceptual study · ★★ (~19) · Tags: accountability, ownership, human–AI collaboration.&lt;/strong&gt; Examines how intrinsic motivation and social responsibility support accountability in review and why replacing human interaction with LLM feedback can alter those mechanisms.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3803437.3805235&quot;&gt;Benchmarking LLMs for Fine-Grained Code Review with Enriched Context in Practice&lt;/a&gt; — Hu et al., &lt;em&gt;FSE Industry Track&lt;/em&gt;, 2026. &lt;strong&gt;PR · Benchmark of 67,910 context-enriched review instances plus industrial deployment · NEW · Tags: issue context, code context, LLM.&lt;/strong&gt; Finds that textual context improves benchmark performance more than code context alone and that current models remain limited; at ByteDance, using the benchmark as a reward signal improved a self-evolving review tool’s measured performance by 61.98%.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3808144&quot;&gt;SWR-Bench: Assessing LLM Performance in Real-World Code Review Comment Generation&lt;/a&gt; — Zeng et al., &lt;em&gt;Proceedings of the ACM on Software Engineering&lt;/em&gt;, 2026. &lt;strong&gt;PR · Benchmark of 1,000 manually verified pull requests with full repository context · NEW · Tags: benchmark, repository context, LLM.&lt;/strong&gt; Shows that current systems remain weak on realistic, context-rich review-comment generation; combining systems improves results but leaves substantial room below human-quality review.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3786583.3786851&quot;&gt;RovoDev Code Reviewer: A Large-Scale Online Evaluation of LLM-Based Code Review Automation at Atlassian&lt;/a&gt; — Tantithamthavorn et al., &lt;em&gt;ICSE Software Engineering in Practice&lt;/em&gt;, 2026. &lt;strong&gt;PR · Large industrial online evaluation · ★ (~5) · Tags: LLM, deployment, cycle time.&lt;/strong&gt; Reports that 38.7% of generated comments led to code changes, while observed pull-request cycle time fell by 30.8% and human review comments by 35.6% in the evaluated deployment context.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3803437.3805217&quot;&gt;AI-Assisted Fixes to Code Review Comments at Scale&lt;/a&gt; — Maddila et al., &lt;em&gt;FSE Industry Track&lt;/em&gt;, 2026. &lt;strong&gt;PR · 64,000-pair benchmark, randomized safety trial, and production deployment at Meta · NEW · Tags: LLM, automated fixes, deployment.&lt;/strong&gt; An initial interface made reviewers more than 5% slower; showing suggestions only to authors removed that regression, and the deployed model reached a 19.7% actionable-to-applied rate—9.2 percentage points above GPT-4o.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3830405&quot;&gt;Engagement in Code Review: Emotional, Behavioral, and Cognitive Dimensions in Peer vs. LLM Interactions&lt;/a&gt; — Alami and Ernst, &lt;em&gt;ACM Transactions on Software Engineering and Methodology&lt;/em&gt;, 2026. &lt;strong&gt;PR · Human-centred empirical study · NEW · Tags: engagement, cognition, emotion.&lt;/strong&gt; Frames review engagement as cognitive, emotional, and behavioural, showing that peer and LLM interactions create materially different forms of effort and participation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3786167.3788428&quot;&gt;Toward Author-Guided Review: An Agentic Architecture for Reflective Code Review&lt;/a&gt; — Davila and Wiese, &lt;em&gt;AGENT&lt;/em&gt;, 2026. &lt;strong&gt;PR · Prototype architecture · NEW · Tags: agents, reflection, orchestration.&lt;/strong&gt; Proposes a multi-agent review architecture intended to improve reasoning and self-correction; evidence remains early-stage until independently evaluated in realistic development settings.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Human factors and review content&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1007/s10664-024-10550-9&quot;&gt;Understanding and Effectively Mitigating Code Review Anxiety&lt;/a&gt; — Lee et al., &lt;em&gt;Empirical Software Engineering&lt;/em&gt;, 2024. &lt;strong&gt;PR · Observational model plus randomized waitlist-controlled intervention · ★★ (~13) · Tags: anxiety, avoidance, intervention.&lt;/strong&gt; Finds that anxiety is strongly associated with avoidance behaviours such as procrastination and rubber-stamping, and provides initial experimental evidence that a brief cognitive-behavioural workshop can reduce code-review anxiety.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3708518&quot;&gt;Explaining Explanations: An Empirical Study of Explanations in Code Reviews&lt;/a&gt; — Widyasari et al., &lt;em&gt;ACM Transactions on Software Engineering and Methodology&lt;/em&gt;, 2025. &lt;strong&gt;PR · Empirical repository study · ★★ (~21) · Tags: rationale, comments, comprehension.&lt;/strong&gt; Shows that explanations are an important but unevenly supplied part of review feedback, motivating tools and practices that help reviewers communicate reasons rather than only requested changes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1007/s10664-024-10560-7&quot;&gt;A Qualitative Study on Refactorings Induced by Code Review&lt;/a&gt; — Coelho et al., &lt;em&gt;Empirical Software Engineering&lt;/em&gt;, 2025. &lt;strong&gt;PR · Qualitative repository study · ★★ (~10) · Tags: refactoring, maintainability, review comments.&lt;/strong&gt; Characterizes why reviewers request refactorings and how review-triggered refactoring contributes to maintainability beyond direct defect correction.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3808165&quot;&gt;The Interaction of Complexity and Provenance in Code Review Decisions: Evidence from a Controlled Experiment&lt;/a&gt; — Singh et al., &lt;em&gt;FSE&lt;/em&gt;, 2026. &lt;strong&gt;PR · Between-subjects experiment with 385 participants · NEW · Tags: complexity, AI provenance, automation bias.&lt;/strong&gt; Higher code complexity increased acceptance of incorrect revisions; provenance alone had no main effect, but under high complexity reviewers were more likely to accept incorrect revisions labelled as AI-authored.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3803437.3805264&quot;&gt;Assessing Harmful Comments and Specificity in Code Review Feedback at Scale Using Large Language Models&lt;/a&gt; — You et al., &lt;em&gt;FSE Industry Track&lt;/em&gt;, 2026. &lt;strong&gt;PR · More than 204,000 feedback threads from 30 OSS repositories plus data from 45 organizations · NEW · Tags: feedback quality, harmful comments, specificity, LLM.&lt;/strong&gt; LLM classifiers reached F1 up to 0.83 for sentiment and 0.67 for specificity; harmful comments were rare, while specificity analysis proved more immediately useful in industrial deployment.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Reviewer selection and risk-aware workflows&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3797070&quot;&gt;Mitigating the Risk of Defects and Improving Knowledge Distribution with Code Reviewer Recommenders&lt;/a&gt; — Sefidi Esfahani and Rigby, &lt;em&gt;FSE&lt;/em&gt;, 2026. &lt;strong&gt;PR · Repository analysis and simulation · NEW · Tags: reviewer recommendation, defect risk, knowledge distribution.&lt;/strong&gt; Introduces a team-level changeset-safety measure and simulates adding an expert to risky pull requests; the strategy improves modeled defect-finding effectiveness while balancing workload and knowledge distribution, but the outcome is simulated rather than a live causal deployment.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3803437.3805220&quot;&gt;Code Reviewer Recommendation for High Risk Diffs at Scale: Workflow, Recommender, and Live Experiments&lt;/a&gt; — Paraspatki et al., &lt;em&gt;FSE Industry Track&lt;/em&gt;, 2026. &lt;strong&gt;PR · Two randomized industrial trials covering more than 20,000 high-risk diffs · NEW · Tags: risk-aware review, reviewer recommendation, A/B test.&lt;/strong&gt; A dedicated high-risk workflow increased review depth and reduced final risk classifications by 9.56% with a 0.45% review-time increase; a tailored recommender produced 9.94% more comments and 7.77% more acceptances without significant guardrail regressions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Security&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3650212.3680313&quot;&gt;An Empirical Study of Static Analysis Tools for Secure Code Review&lt;/a&gt; — Charoenwet et al., &lt;em&gt;ISSTA&lt;/em&gt;, 2024. &lt;strong&gt;PR · 319 vulnerabilities and 815 vulnerability-contributing commits across 92 C/C++ projects · ★★★ (~88) · Tags: static analysis, secure review, prioritization.&lt;/strong&gt; Finds that tested static-analysis tools can surface useful warnings for some vulnerable changes, but at least 76% of warnings were irrelevant and 22% of vulnerable changes were missed; prioritization improved precision and recall only modestly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1007/s10664-024-10496-y&quot;&gt;Toward Effective Secure Code Reviews: An Empirical Study of Security-Related Coding Weaknesses&lt;/a&gt; — Charoenwet et al., &lt;em&gt;Empirical Software Engineering&lt;/em&gt;, 2024. &lt;strong&gt;PR · Case study of OpenSSL and PHP using 135,560 review comments · ★★ (~25) · Tags: security, coding weaknesses, remediation.&lt;/strong&gt; Reviewers raised concerns covering 35 of 40 CWE-699 categories, but only about 37% were fixed in the same review and some changes were merged despite unresolved security concerns.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3744916.3764557&quot;&gt;SeRe: A Security-Related Code Review Dataset Aligned with Real-World Review Activities&lt;/a&gt; — Zhao et al., &lt;em&gt;ICSE&lt;/em&gt;, 2026. &lt;strong&gt;Accepted at ICSE · Dataset of 6,732 security-related reviews selected from 373,824 review instances · NEW · Tags: security, dataset, multilingual repositories.&lt;/strong&gt; Provides a curated benchmark for security-specific review classification and generation, while its value for production effectiveness still requires downstream validation.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h1&gt;Emerging, not-yet-peer-reviewed work from 2024–2026&lt;/h1&gt;
&lt;p&gt;These manuscripts are current and potentially useful, but should not be presented as established evidence until peer review, replication, and stable publication metadata are available.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/2602.13377&quot;&gt;A Survey of Code Review Benchmarks and Evaluation Practices in Pre-LLM and LLM Era&lt;/a&gt; — 2026. &lt;strong&gt;Preprint · Systematic survey of 99 papers · NEW · Tags: benchmarks, evaluation, LLM.&lt;/strong&gt; Compares 58 pre-LLM and 41 LLM-era studies across five domains and 18 tasks and highlights fragmentation in datasets, metrics, and evaluation protocols.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/2505.20206&quot;&gt;Evaluating Large Language Models for Code Review&lt;/a&gt; — 2025. &lt;strong&gt;Preprint · Comparative model evaluation · NEW · Tags: correctness classification, repair, context.&lt;/strong&gt; Reports best-case scores of 68.50% for issue classification and 67.83% for correction, with performance dropping when issue descriptions are absent; the results support human-in-the-loop use rather than autonomous acceptance.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h1&gt;Established peer-reviewed research&lt;/h1&gt;
&lt;h2&gt;1. Field overviews and taxonomies&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1016/j.jss.2021.110951&quot;&gt;A Systematic Literature Review and Taxonomy of Modern Code Review&lt;/a&gt; — Davila and Nunes, &lt;em&gt;Journal of Systems and Software&lt;/em&gt;, 2021. &lt;strong&gt;PR · Systematic review of 139 papers · ★★★ (~70–125) · Tags: taxonomy, research methods.&lt;/strong&gt; Organizes the field into foundational studies, proposals, and evaluations and provides a strong starting point for discovering earlier work.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3585004&quot;&gt;Modern Code Reviews—Survey of Literature and Practice&lt;/a&gt; — Badampudi et al., &lt;em&gt;ACM Transactions on Software Engineering and Methodology&lt;/em&gt;, 2023. &lt;strong&gt;PR · Review of 244 primary studies plus practitioner survey · ★★★ (~80) · Tags: synthesis, research–practice gap.&lt;/strong&gt; Identifies five major research themes and shows that practitioners value quality and process outcomes more consistently than human-factor or support-system claims.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/QRS.2016.19&quot;&gt;A Faceted Classification Scheme for Change-Based Industrial Code Review Processes&lt;/a&gt; — Baum et al., &lt;em&gt;QRS&lt;/em&gt;, 2016. &lt;strong&gt;PR · Classification grounded in industrial processes · ★★★ (~73) · Tags: process design, industry.&lt;/strong&gt; Defines dimensions for comparing change-based review processes instead of treating “code review” as one uniform practice.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;2. Practices, process, and organizational context&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/ICSE.2013.6606617&quot;&gt;Expectations, Outcomes, and Challenges of Modern Code Review&lt;/a&gt; — Bacchelli and Bird, &lt;em&gt;ICSE&lt;/em&gt;, 2013. &lt;strong&gt;PR · Microsoft mixed methods · ★★★★★ (~500+) · Tags: motivations, knowledge transfer, challenges.&lt;/strong&gt; Shows that defect finding is the stated primary motivation, while understanding, knowledge transfer, team awareness, and finding alternative solutions are major practical outcomes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/TSE.2016.2576451&quot;&gt;Process Aspects and Social Dynamics of Contemporary Code Review&lt;/a&gt; — Bosu et al., &lt;em&gt;IEEE Transactions on Software Engineering&lt;/em&gt;, 2017. &lt;strong&gt;PR · Comparative Microsoft and OSS study · ★★★ · Tags: process, social dynamics, industry–OSS comparison.&lt;/strong&gt; Demonstrates that review outcomes and participation are shaped by both process design and social relationships, with meaningful differences between company and open-source settings.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://www.microsoft.com/en-us/research/publication/code-reviewing-in-the-trenches-understanding-challenges-best-practices-and-tool-needs/&quot;&gt;Code Reviewing in the Trenches: Understanding Challenges, Best Practices and Tool Needs&lt;/a&gt; — MacLeod et al., &lt;em&gt;IEEE Software&lt;/em&gt;, 2018. &lt;strong&gt;PR · Industrial interviews and observations · ★★★ · Tags: reviewer needs, tools, practice.&lt;/strong&gt; Identifies recurring practical difficulties including understanding changes, finding suitable reviewers, managing context, and communicating effectively.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://research.google/pubs/modern-code-review-a-case-study-at-google/&quot;&gt;Modern Code Review: A Case Study at Google&lt;/a&gt; — Sadowski et al., &lt;em&gt;ICSE Software Engineering in Practice&lt;/em&gt;, 2018. &lt;strong&gt;PR · Large industrial study: interviews, survey, and 9 million reviewed changes · ★★★★★ (~560) · Tags: Google, process, scale.&lt;/strong&gt; Documents Google’s lightweight review process, review norms, tooling, and motivations at very large organizational scale.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3474624.3477063&quot;&gt;Code Review Is Just Reviewing Code? A Qualitative Study to Understand the Activities Developers Perform During Code Review&lt;/a&gt; — Cunha et al., &lt;em&gt;SBES&lt;/em&gt;, 2021. &lt;strong&gt;PR · Qualitative study · ★★ (~26) · Tags: activities, collaboration, sensemaking.&lt;/strong&gt; Shows that review includes coordination, learning, design discussion, and process work in addition to inspecting code.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1007/s10664-021-10053-x&quot;&gt;Developers’ Perception of Peer Code Review in Research Software Development&lt;/a&gt; — Eisty and Carver, &lt;em&gt;Empirical Software Engineering&lt;/em&gt;, 2022. &lt;strong&gt;PR · Survey of research-software developers · ★★ (~41) · Tags: research software, adoption, perceived value.&lt;/strong&gt; Finds broad perceived value in peer review but also context-specific barriers involving expertise, resources, and the less standardized nature of research-software teams.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1007/s10664-021-10038-w&quot;&gt;Using a Balanced Scorecard to Identify Opportunities to Improve Code Review Effectiveness&lt;/a&gt; — Hasan et al., &lt;em&gt;Empirical Software Engineering&lt;/em&gt;, 2021. &lt;strong&gt;PR · Industrial experience report · ★★ · Tags: measurement, process improvement, dashboards.&lt;/strong&gt; Describes a multi-dimensional measurement approach for identifying review bottlenecks and selecting improvement initiatives rather than optimizing a single metric.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;3. Outcomes, effectiveness, and value&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/2597073.2597076&quot;&gt;The Impact of Code Review Coverage and Code Review Participation on Software Quality&lt;/a&gt; — McIntosh et al., &lt;em&gt;MSR&lt;/em&gt;, 2014. &lt;strong&gt;PR · Multi-project archival study · ★★★ · Tags: coverage, participation, defects.&lt;/strong&gt; Reports associations between lower review coverage or participation and poorer post-release quality; the observational design supports association, not a simple causal claim.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/2597073.2597082&quot;&gt;Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?&lt;/a&gt; — Beller et al., &lt;em&gt;MSR&lt;/em&gt;, 2014. &lt;strong&gt;PR · Manual classification of more than 1,400 changes · ★★★★ (~350) · Tags: defects, maintainability, OSS.&lt;/strong&gt; Finds that review addresses a broad mixture of functional defects, evolvability concerns, and other issues rather than only correctness bugs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://www.microsoft.com/en-us/research/publication/characteristics-of-useful-code-reviews-an-empirical-study-at-microsoft/&quot;&gt;Characteristics of Useful Code Reviews: An Empirical Study at Microsoft&lt;/a&gt; — Bosu et al., &lt;em&gt;MSR&lt;/em&gt;, 2015. &lt;strong&gt;PR · Microsoft mixed methods · ★★★ · Tags: useful comments, change size, reviewer experience.&lt;/strong&gt; Identifies factors associated with useful comments and reports that reviews spanning more files tend to contain a lower proportion of useful feedback.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/ICSE.2019.00111&quot;&gt;Why Does Code Review Work for Open Source Software Communities?&lt;/a&gt; — Alami et al., &lt;em&gt;ICSE&lt;/em&gt;, 2019. &lt;strong&gt;PR · Qualitative study · ★★★ (~59) · Tags: mechanisms, community, trust.&lt;/strong&gt; Explains review effectiveness through community mechanisms such as accountability, transparency, shared ownership, and relationship building—not only defect detection.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3524842.3528448&quot;&gt;Do Small Code Changes Merge Faster? A Multi-Language Empirical Investigation&lt;/a&gt; — Catolino et al., &lt;em&gt;MSR&lt;/em&gt;, 2022. &lt;strong&gt;PR · Multi-project archival study · ★★ (~16) · Tags: size, latency, pull requests.&lt;/strong&gt; Contrary to common advice, finds no consistent relationship between pull-request size or composition and time to merge in the studied projects.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3544791&quot;&gt;Nudge: Accelerating Overdue Pull Requests Toward Completion&lt;/a&gt; — Kudrjavets et al., &lt;em&gt;ACM Transactions on Software Engineering and Methodology&lt;/em&gt;, 2023. &lt;strong&gt;PR · Large industrial intervention · ★★ (~49) · Tags: latency, reminders, workflow.&lt;/strong&gt; Reports that targeted automated reminders reduced resolution time for overdue pull requests by roughly 60% in the evaluated deployment.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;4. Reviewability, cognition, and change design&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3180155.3180192&quot;&gt;When Testing Meets Code Review: Why and How Developers Review Tests&lt;/a&gt; — Spadini et al., &lt;em&gt;ICSE&lt;/em&gt;, 2018. &lt;strong&gt;PR · Mixed methods · ★★★ (~92) · Tags: tests, reviewer attention, practices.&lt;/strong&gt; Shows that developers do review tests, but test review receives uneven attention and involves concerns that differ from production-code review.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/ICSE.2019.00110&quot;&gt;Test-Driven Code Review: An Empirical Study&lt;/a&gt; — Spadini et al., &lt;em&gt;ICSE&lt;/em&gt;, 2019. &lt;strong&gt;PR · Controlled experiment · ★★★ · Tags: review order, tests, defects.&lt;/strong&gt; Reviewing tests before production code led participants to find more test-code defects and fewer maintainability issues in production code, while the number of production-code defects found did not materially change.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3236024.3236080&quot;&gt;What Makes a Code Change Easier to Review: An Empirical Investigation on Code Change Reviewability&lt;/a&gt; — Baum et al., &lt;em&gt;ESEC/FSE&lt;/em&gt;, 2018. &lt;strong&gt;PR · Multi-method empirical study · ★★★ · Tags: reviewability, change description, complexity.&lt;/strong&gt; Identifies technical and presentation characteristics that affect perceived review difficulty, supporting reviewability as a broader construct than change size alone.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://doi.org/10.1145/3377811.3380385&quot;&gt;Primers or Reminders? The Effects of Existing Review Comments on Code Review&lt;/a&gt; — Spadini, Çalikli, and Bacchelli, &lt;em&gt;ICSE&lt;/em&gt;, 2020. &lt;strong&gt;PR · Controlled experiment with 85 developers · ★★ · Tags: cognitive bias, existing comments, defect detection.&lt;/strong&gt; Although approximately 70% of participants showed susceptibility to availability bias, existing comments did not generally bias review outcomes; comments about unusual bug types increased detection of another bug of the same type without reducing detection of unrelated bugs.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3540250.3549177&quot;&gt;First Come First Served: The Impact of File Position on Code Review&lt;/a&gt; — Fregnan et al., &lt;em&gt;ESEC/FSE&lt;/em&gt;, 2022. &lt;strong&gt;PR · Large repository study plus controlled experiment · ★★ · Tags: ordering, attention, cognition.&lt;/strong&gt; Shows a strong position effect: in the experiment, a defect had substantially lower odds of detection when its file appeared last rather than first.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1007/s10664-020-09909-5&quot;&gt;An Exploratory Study on Confusion in Code Reviews&lt;/a&gt; — Ebert et al., &lt;em&gt;Empirical Software Engineering&lt;/em&gt;, 2021. &lt;strong&gt;PR · Qualitative and repository study · ★★★ · Tags: confusion, comprehension, communication.&lt;/strong&gt; Characterizes signals and causes of reviewer confusion and shows that unresolved misunderstanding can lengthen discussions and impede review progress.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;5. Reviewer selection, participation, workload, and latency&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/2652524.2652544&quot;&gt;Impact of Developer Reputation on Code Review Outcomes in OSS Projects&lt;/a&gt; — Bosu and Carver, &lt;em&gt;ESEM&lt;/em&gt;, 2014. &lt;strong&gt;PR · Multi-project archival study · ★★★ · Tags: reputation, acceptance, latency.&lt;/strong&gt; Finds that contributor reputation is associated with acceptance, feedback speed, completion time, and the number of patch sets required.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/ESEM.2013.19&quot;&gt;Impact of Peer Code Review on Peer Impression Formation: A Survey&lt;/a&gt; — Bosu and Carver, &lt;em&gt;ESEM&lt;/em&gt;, 2013. &lt;strong&gt;PR · Survey · ★★ · Tags: trust, reputation, social judgment.&lt;/strong&gt; Shows that review interactions shape developers’ impressions of one another, linking technical review behaviour to future collaboration and trust.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/TSE.2018.2868367&quot;&gt;Does Reviewer Recommendation Help Developers?&lt;/a&gt; — Thongtanunam et al., &lt;em&gt;IEEE Transactions on Software Engineering&lt;/em&gt;, 2020. &lt;strong&gt;PR · Tool evaluation and practitioner study · ★★★ (~70) · Tags: reviewer recommendation, adoption, evaluation.&lt;/strong&gt; Finds that recommendations were often perceived as relevant but rarely added practical value beyond developers’ existing knowledge, showing that offline accuracy alone is an insufficient evaluation criterion.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3510457.3513035&quot;&gt;Code Reviewer Recommendation in Tencent: Practice, Challenge, and Direction&lt;/a&gt; — Rong et al., &lt;em&gt;ICSE Software Engineering in Practice&lt;/em&gt;, 2022. &lt;strong&gt;PR · Large industrial comparison · ★★ (~15) · Tags: reviewer recommendation, Tencent, deployment.&lt;/strong&gt; Compares established recommendation approaches in a production environment and identifies practical constraints—such as organizational structure, workload, and maintainability—that offline benchmarks often omit.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/SANER53432.2022.00080&quot;&gt;Recommending Code Reviewers for Proprietary Software Projects: A Large Scale Study&lt;/a&gt; — Rong et al., &lt;em&gt;SANER&lt;/em&gt;, 2022. &lt;strong&gt;PR · Large industrial study at Tencent · ★★ (~18) · Tags: reviewer recommendation, proprietary software, scale.&lt;/strong&gt; Evaluates reviewer-recommendation techniques on proprietary projects and introduces CAMP, showing that production constraints and organizational context materially affect recommendation usefulness.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;6. Human factors, communication, conflict, and inclusion&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3512945&quot;&gt;Interpersonal Conflicts During Code Review: Developers’ Experience and Practices&lt;/a&gt; — Wurzel Gonçalves et al., &lt;em&gt;Proceedings of the ACM on Human-Computer Interaction&lt;/em&gt;, 2022. &lt;strong&gt;PR · Interviews with 22 developers · ★★ (~26) · Tags: conflict, coping, communication.&lt;/strong&gt; Characterizes conflict causes, consequences, and developer coping strategies, showing that conflicts can damage relationships and participation even when the technical issue is resolved.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3377811.3380414&quot;&gt;Predicting Developers’ Negative Feelings About Code Review&lt;/a&gt; — Egelman et al., &lt;em&gt;ICSE&lt;/em&gt;, 2020. &lt;strong&gt;PR · Large industrial mixed methods · ★★★ (~83) · Tags: negative experience, prediction, organizational climate.&lt;/strong&gt; Connects review-process and interaction signals with developers’ negative experiences, enabling teams to study socio-technical review health rather than only throughput.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3474097&quot;&gt;The Pushback Effects of Race, Ethnicity, Gender, and Age in Code Review&lt;/a&gt; — Murphy-Hill et al., &lt;em&gt;Communications of the ACM&lt;/em&gt;, 2022. &lt;strong&gt;PR · Large industrial observational study · ★★ · Tags: demographics, pushback, inclusion.&lt;/strong&gt; Reports that the amount of pushback authors receive varies with demographic characteristics, while emphasizing that these observational differences require organizational investigation rather than assumptions about individual performance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/TSE.2021.3056942&quot;&gt;Engineering Impacts of Anonymous Author Code Review&lt;/a&gt; — Murphy-Hill et al., &lt;em&gt;IEEE Transactions on Software Engineering&lt;/em&gt;, 2022. &lt;strong&gt;PR · Industrial field experiment, 5,217 reviews and 300 engineers · ★★ (~18) · Tags: anonymity, bias mitigation, outcomes.&lt;/strong&gt; Tests anonymous-author review in practice and provides direct experimental evidence about its engineering and behavioural effects rather than relying only on observational demographic comparisons.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3579527&quot;&gt;Systemic Gender Inequities in Who Reviews Code&lt;/a&gt; — Egelman et al., &lt;em&gt;Proceedings of the ACM on Human-Computer Interaction&lt;/em&gt;, 2023. &lt;strong&gt;PR · Large industrial mixed methods · ★★ (~14) · Tags: reviewer workload, gender, recommender systems.&lt;/strong&gt; Finds that women performed about 25% fewer reviews on average and traces the difference to reviewer choice, recommender-system amplification, and unequal access to reviewer credentials.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1007/s10664-023-10324-9&quot;&gt;Code Reviews in Open Source Projects: How Do Gender Biases Affect Participation and Outcomes?&lt;/a&gt; — Sultana et al., &lt;em&gt;Empirical Software Engineering&lt;/em&gt;, 2023. &lt;strong&gt;PR · 1,010 projects across 14 datasets · ★★ (~32) · Tags: gender, participation, acceptance, latency.&lt;/strong&gt; Finds widespread but context-dependent gender differences; reviewer participation was the most consistently unequal outcome, while the direction of acceptance and latency differences varied across communities.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/SANER.2019.8668027&quot;&gt;Expressions of Sentiments During Code Reviews: Male vs. Female&lt;/a&gt; — Paul et al., &lt;em&gt;SANER&lt;/em&gt;, 2019. &lt;strong&gt;PR · Multi-project archival study · ★★ · Tags: sentiment, gender, communication.&lt;/strong&gt; Reports gender-associated differences in positive and negative sentiment expression across six open-source review communities, while not establishing that sentiment differences are caused by gender.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3368089.3409681&quot;&gt;Biases and Differences in Code Review Using Medical Imaging and Eye-Tracking: Genders, Humans, and Machines&lt;/a&gt; — Huang et al., &lt;em&gt;ESEC/FSE&lt;/em&gt;, 2020. &lt;strong&gt;PR · Controlled eye-tracking and neuroimaging study · ★★ · Tags: attention, gender, automation bias.&lt;/strong&gt; Finds measurable differences in review attention and evaluation behaviour across participant and code-provenance conditions, illustrating that review judgments can be influenced by factors beyond code content.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3583562&quot;&gt;Automated Identification of Toxic Code Reviews Using ToxiCR&lt;/a&gt; — Sarker et al., &lt;em&gt;ACM Transactions on Software Engineering and Methodology&lt;/em&gt;, 2023. &lt;strong&gt;PR · Labelled dataset and classifier evaluation · ★★★ (~80) · Tags: toxicity, NLP, tooling.&lt;/strong&gt; Introduces a software-engineering-specific toxicity taxonomy, dataset, and classifier that outperforms general-purpose toxicity detectors on code-review text.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.7717/peerj-cs.111&quot;&gt;Gender Differences and Bias in Open Source: Pull Request Acceptance of Women Versus Men&lt;/a&gt; — Terrell et al., &lt;em&gt;PeerJ Computer Science&lt;/em&gt;, 2017. &lt;strong&gt;PR · Large multi-project archival study of roughly 3 million pull requests · ★★★★★ · Tags: gender, acceptance, identity visibility.&lt;/strong&gt; Women’s pull requests had higher acceptance rates overall, but among external contributors whose gender was identifiable, women’s contributions were accepted less often than men’s; this difference was not observed when gender was not identifiable.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/ICSE.2019.00079&quot;&gt;Investigating the Effects of Gender Bias on GitHub&lt;/a&gt; — Imtiaz et al., &lt;em&gt;ICSE&lt;/em&gt;, 2019. &lt;strong&gt;PR · Large-scale quantitative GitHub study · ★★★ · Tags: gender, communication, participation.&lt;/strong&gt; Finds little direct evidence of the four investigated gender-bias effects in observable GitHub outcomes, but reports that women concentrated their work in fewer repositories and communicated more restrainedly than men.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/TSE.2021.3073773&quot;&gt;On the Relationship Between the Developer’s Perceptible Race and Ethnicity and the Evaluation of Contributions in OSS&lt;/a&gt; — Nadri et al., &lt;em&gt;IEEE Transactions on Software Engineering&lt;/em&gt;, 2022. &lt;strong&gt;PR · Large multi-project archival study of more than 2 million pull requests · ★★★ · Tags: race, ethnicity, acceptance, affinity bias.&lt;/strong&gt; Contributions from developers perceived as White had approximately 6–10% higher odds of acceptance than contributions from developers perceived as non-White; non-White contributors also had better acceptance odds when the integrator was perceived as belonging to the same racial or ethnic group.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;7. Security-focused code review&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/2635868.2635880&quot;&gt;Identifying the Characteristics of Vulnerable Code Changes: An Empirical Study&lt;/a&gt; — Bosu et al., &lt;em&gt;FSE&lt;/em&gt;, 2014. &lt;strong&gt;PR · Empirical security study · ★★★ · Tags: vulnerable changes, risk factors, targeting.&lt;/strong&gt; Characterizes change properties associated with vulnerability introduction to help teams target scarce security-review attention.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/SCAM.2016.30&quot;&gt;A Security Perspective on Code Review: The Case of Chromium&lt;/a&gt; — Bosu et al., &lt;em&gt;SCAM&lt;/em&gt;, 2016. &lt;strong&gt;PR · Chromium archival study · ★★★ · Tags: security review, vulnerabilities, reviewer expertise.&lt;/strong&gt; Examines how security concerns appear in Chromium review and how reviewer participation and change characteristics relate to security outcomes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3127005.3127014&quot;&gt;A Large-Scale Study of Modern Code Review and Security in Open Source Projects&lt;/a&gt; — Thompson and Wagner, &lt;em&gt;PROMISE&lt;/em&gt;, 2017. &lt;strong&gt;PR · 3,126 projects, 143 languages, 489,038 issues, and 382,771 pull requests · ★★★ (~53) · Tags: security, review coverage, OSS.&lt;/strong&gt; Finds associations between modern review practices and security-related outcomes at large scale, while the observational design does not establish that review alone caused those outcomes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/ICSE43902.2021.00054&quot;&gt;Why Don’t Developers Detect Improper Input Validation? &lt;code class=&quot;language-text&quot;&gt;&apos;; DROP TABLE Papers;&lt;/code&gt;&lt;/a&gt; — Braz et al., &lt;em&gt;ICSE&lt;/em&gt;, 2021. &lt;strong&gt;PR · Controlled online experiment with 146 participants · ★★ (~38) · Tags: input validation, threat framing, warnings.&lt;/strong&gt; Finds that making an attack scenario visible and providing security warnings improves detection of improper input validation during review.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/ICSE43902.2021.00124&quot;&gt;Why Security Defects Go Unnoticed During Code Reviews? A Case-Control Study of the Chromium OS Project&lt;/a&gt; — Paul et al., &lt;em&gt;ICSE&lt;/em&gt;, 2021. &lt;strong&gt;PR · Case-control study: 516 detected and 374 escaped defects · ★★/★★★ (~36–60) · Tags: escaped defects, workload, review history.&lt;/strong&gt; Identifies factors associated with detection and escape, including reviewer load, change spread, mutual-review relationships, and prior file history.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3540250.3549135&quot;&gt;Software Security During Modern Code Review: The Developer’s Perspective&lt;/a&gt; — Braz and Bacchelli, &lt;em&gt;ESEC/FSE&lt;/em&gt;, 2022. &lt;strong&gt;PR · 10 interviews plus survey of 182 developers · ★★ · Tags: security mindset, expertise, process.&lt;/strong&gt; Shows that developers often treat security as implicit or specialist work and identifies gaps in security knowledge, training, process, and tooling that prevent security from becoming a routine review concern.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;8. Static analysis, bots, and traditional automation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/VLHCC.2017.8103456&quot;&gt;Evaluating How Static Analysis Tools Can Reduce Code Review Effort&lt;/a&gt; — Panichella et al., &lt;em&gt;VL/HCC&lt;/em&gt;, 2017. &lt;strong&gt;PR · Comparative empirical study · ★★★ (~114) · Tags: static analysis, reviewer effort, overlap.&lt;/strong&gt; Finds that an off-the-shelf static analyser detected about 16% of issues raised manually, with additional potential from project-specific rules; this supports complementing rather than replacing human review.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1109/ICSE43902.2021.00027&quot;&gt;Towards Automating Code Review Activities&lt;/a&gt; — Tufano et al., &lt;em&gt;ICSE&lt;/em&gt;, 2021. &lt;strong&gt;PR · Neural-model evaluation · ★★★ · Tags: comment generation, code transformation, automation.&lt;/strong&gt; Demonstrates the feasibility of learning selected review activities from historical data while exposing substantial limitations in generalisation and complete end-to-end automation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/3510003.3510621&quot;&gt;Using Pre-Trained Models to Boost Code Review Automation&lt;/a&gt; — Tufano et al., &lt;em&gt;ICSE&lt;/em&gt;, 2022. &lt;strong&gt;PR · Large model evaluation · ★★★★ (~306) · Tags: pre-trained models, comment generation, code changes.&lt;/strong&gt; Shows that pre-training substantially improves automated review-comment and code-change tasks compared with models trained only on task-specific review data.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1007/s10664-022-10130-9&quot;&gt;Investigating the Effects of Code Review Bots on Pull Request Activities&lt;/a&gt; — Wessel et al., &lt;em&gt;Empirical Software Engineering&lt;/em&gt;, 2022. &lt;strong&gt;PR · 1,194 projects plus 12 interviews · ★★ (~41) · Tags: bots, communication, pull-request outcomes.&lt;/strong&gt; Associates bot adoption with more merged and fewer abandoned pull requests, while also finding reduced human communication and new integration challenges.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1007/s10664-022-10232-4&quot;&gt;Can Static Analysis Tools Find More Defects? A Qualitative Study of Design Rule Violations Found by Code Review&lt;/a&gt; — Lenarduzzi et al., &lt;em&gt;Empirical Software Engineering&lt;/em&gt;, 2023. &lt;strong&gt;PR · Qualitative classification of 1,323 review defects · ★★ · Tags: static analysis, design rules, automation potential.&lt;/strong&gt; Finds that many review findings map to rules that static analysis could potentially encode, but theoretical detectability should not be interpreted as demonstrated precision and recall in live review.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h1&gt;Historical foundations and adjacent evidence&lt;/h1&gt;
&lt;p&gt;These works are useful for understanding modern code review but should not be mixed uncritically with contemporary asynchronous, tool-mediated review.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://doi.org/10.1145/2568225.2568260&quot;&gt;An Exploratory Study of the Pull-Based Software Development Model&lt;/a&gt; — Gousios et al., &lt;em&gt;ICSE&lt;/em&gt;, 2014. &lt;strong&gt;PR · Large multi-project archival study · ★★★★★ (~900) · Tags: pull requests, integration, participation.&lt;/strong&gt; Establishes foundational evidence about pull-request contribution, evaluation, integration time, and community participation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://www.proquest.com/openview/45a40e77be454b467ab4d058336a1a3b/&quot;&gt;The Effect of Familiarity Between Author and Reviewers on the Effectiveness of Code Inspection Meetings&lt;/a&gt; — 1999. &lt;strong&gt;Dissertation/non-journal source · Historical inspection study · — · Tags: familiarity, synchronous inspection.&lt;/strong&gt; Examines how prior familiarity may affect traditional inspection meetings; applicability to modern asynchronous review should be treated cautiously.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h1&gt;Grey literature and quantitative industry analyses&lt;/h1&gt;
&lt;p&gt;Keep these in a separate section. They may offer useful scale or practitioner hypotheses, but their sampling, analysis, and review procedures usually provide weaker safeguards than peer-reviewed research.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://insights.adadot.com/2023/11/23/does-size-matter-in-pull-requests-insights-from-30k-developers/&quot;&gt;Does Size Matter in Pull Requests? Insights from 30K Developers&lt;/a&gt; — Adadot, 2023. &lt;strong&gt;Grey literature · Proprietary quantitative analysis · Tags: size, latency, developer analytics.&lt;/strong&gt; Reports associations between pull-request size and process outcomes, but should be interpreted alongside the peer-reviewed multi-language study that found no consistent size–merge-time relationship.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h1&gt;Recommended contribution format&lt;/h1&gt;
&lt;p&gt;Use this format for each pull request:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;markdown&quot;&gt;&lt;pre class=&quot;language-markdown&quot;&gt;&lt;code class=&quot;language-markdown&quot;&gt;&lt;span class=&quot;token list punctuation&quot;&gt;-&lt;/span&gt; [Paper title](canonical DOI or publisher URL) — Author et al., &lt;span class=&quot;token italic&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;token content&quot;&gt;Venue&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;*&lt;/span&gt;&lt;/span&gt;, year. &lt;span class=&quot;token bold&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;token content&quot;&gt;Status · Evidence profile and sample/scope · Citation band · Tags.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;**&lt;/span&gt;&lt;/span&gt; One sentence stating the principal finding without implying causality beyond the study design.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Required checks:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use the canonical DOI or official publisher page where possible.&lt;/li&gt;
&lt;li&gt;Verify the publication year, venue, and peer-review status.&lt;/li&gt;
&lt;li&gt;State the actual design and scope—for example, “single-company archival study,” not merely “empirical study.”&lt;/li&gt;
&lt;li&gt;Distinguish observed association from demonstrated causal effect.&lt;/li&gt;
&lt;li&gt;State null findings explicitly.&lt;/li&gt;
&lt;li&gt;Do not describe benchmark performance as evidence of production effectiveness.&lt;/li&gt;
&lt;li&gt;Do not describe citation count as evidence quality.&lt;/li&gt;
&lt;li&gt;Add a citation-source and retrieval-date field if counts are generated automatically.&lt;/li&gt;
&lt;li&gt;Re-check the “Recent” sections at least annually and move older work into the topic taxonomy.&lt;/li&gt;
&lt;/ol&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Overview of Code Review Research”: &lt;a href=&quot;https://www.awesomecodereviews.com/research/code-review-research-overview/&quot;&gt;https://www.awesomecodereviews.com/research/code-review-research-overview/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2026-07-24T09:59:30+01:00&quot;&gt;July 24, 2026&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Stacked Pull Requests - The Complete Guide for Developers]]></title><description><![CDATA[This post explains the concepts, workflows, and tools behind stacked pull requests (stacked PRs). In a nutshell, with stacked pull requests…]]></description><link>https://www.awesomecodereviews.com/best-practices/stacked-prs/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/best-practices/stacked-prs/</guid><pubDate>Wed, 17 Sep 2025 13:22:11 GMT</pubDate><content:encoded>&lt;p&gt;This post explains the &lt;strong&gt;concepts, workflows, and tools behind stacked pull requests (stacked PRs)&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In a nutshell, with stacked pull requests we split a large feature into several
&lt;strong&gt;smaller, coherent changes&lt;/strong&gt; that build on one another so they can be
&lt;strong&gt;independently reviewed&lt;/strong&gt; and then merged in dependency order.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Why Stacked Pull Requests?&lt;/h2&gt;
&lt;p&gt;Code reviews are essential for software quality—but let’s be honest: they’re also one of the biggest bottlenecks in modern development.&lt;/p&gt;
&lt;p&gt;Often, authors get stuck waiting for feedback, thus losing valuable momentum.
The reason for long waiting times (and also inefficient code reviews), are often large PRs.
Large PRs mean that reviewers struggle with understanding the multiple, and complex changes that are often
within one PR.&lt;/p&gt;
&lt;p&gt;The outcome?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Slow development cycles&lt;/li&gt;
&lt;li&gt;Higher risk of bugs&lt;/li&gt;
&lt;li&gt;Frustrated teams&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Stacked PRs offer a way out.&lt;/strong&gt;
By structuring your work as a &lt;strong&gt;stack of smaller, dependent PRs&lt;/strong&gt;, you can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Keep development flowing without waiting on merges&lt;/li&gt;
&lt;li&gt;Make code reviews shorter, clearer, and more effective&lt;/li&gt;
&lt;li&gt;Reduce the cognitive load for reviewers&lt;/li&gt;
&lt;li&gt;Build higher-quality software, faster&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;h3&gt;What Does Research Say?&lt;/h3&gt;
&lt;p&gt;There is empirical support for decomposing large changes, but the results are
more nuanced than “smaller is always faster.” A
&lt;a href=&quot;https://pmc.ncbi.nlm.nih.gov/articles/PMC7924728/&quot;&gt;controlled experiment with 28 developers&lt;/a&gt;
compared one tangled pull request with the same change split into two logically
coherent pull requests. Reviewers of the decomposed change reported fewer
false-positive issues and approached the review differently. However, they did
not find significantly more defects, finish faster, or understand the change
rationale better.&lt;/p&gt;
&lt;p&gt;This supports the central idea behind stacked PRs: separate different concepts
into coherent review units. It does not mean that stacking automatically
guarantees faster or higher-quality reviews. The quality of the decomposition,
the reviewer, and the surrounding workflow still matter.&lt;/p&gt;
&lt;h2&gt;Typical Feature-Branch Workflow&lt;/h2&gt;
&lt;p&gt;Before looking at stacked-PRs, let’s quickly recap how a typical feature-branch workflow looks like. In a feature-branch workflow, you would start with a feature you want to implement, and create one new branch for said feature. Then, you make several changes (commits) to this branch, and once you finished your feature, you ask your colleagues to review the changes by opening one PR.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;ascii&quot;&gt;&lt;pre class=&quot;language-ascii&quot;&gt;&lt;code class=&quot;language-ascii&quot;&gt;main
 \
  feature&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Such traditional feature-branch workflows often lead to &lt;strong&gt;long-lived branches&lt;/strong&gt; that diverge
from &lt;code&gt;main&lt;/code&gt; for days or weeks. And it also means code reviews only happen once the feature is deemed complete and ready for review. Code reviews usually happen only once the feature is considered complete, which delays feedback. The longer a branch lives, the harder it becomes to keep in sync, the greater the risk of painful merge conflicts, and the more difficult the review process itself becomes.&lt;/p&gt;
&lt;h2&gt;The Stacked PR Workflow&lt;/h2&gt;
&lt;p&gt;In a stacked-PR workflow, you instead start by thinking about how you can split the feature into several coherent subtasks (think divide-and-conquer strategy).&lt;/p&gt;
&lt;p&gt;Here we also follow the &lt;a href=&quot;https://en.wikipedia.org/wiki/Single-responsibility_principle&quot;&gt;single responsibility principle&lt;/a&gt;, which
is not only relevant when we design a software system, but also helpful as a principle for how we work.&lt;/p&gt;
&lt;p&gt;This means that once we identified subtask of our task, we create new branches for each of the subtasks that we identified.
It’s important to know that this also means that the branches are dependent on each other. This means, only the first branch is
branched out of &lt;code&gt;main&lt;/code&gt;. All the other branches, are branched out from the last subtask they depend on.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;ascii&quot;&gt;&lt;pre class=&quot;language-ascii&quot;&gt;&lt;code class=&quot;language-ascii&quot;&gt;main
 \
  subtask-1
   \
    subtask-2
     \
      subtask-3&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Such a stacked-PR approach can keep changes smaller and branches
shorter-lived—provided the bottom of the stack is integrated frequently. It
also creates more focused review units and enables feedback to start before the
complete feature is finished.&lt;/p&gt;
&lt;p&gt;In other words, stacked PRs nudge teams closer to the benefits
of &lt;strong&gt;trunk-based development&lt;/strong&gt;—without giving up the clarity and safety of code review.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Did you know that Meta develops &lt;a href=&quot;#sapling-by-meta&quot;&gt;Sapling&lt;/a&gt;, a Git-compatible
source control system with first-class support for stacked commits and
submitting them as GitHub pull requests?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class=&quot;row&quot;&gt;
  &lt;div class=&quot;col-md-6&quot;&gt;
    &lt;h3&gt;Feature-Branch Workflow&lt;/h3&gt;
    &lt;ol&gt;
      &lt;li&gt;Start working on the complete feature.&lt;/li&gt;
      &lt;li&gt;Branch off `main` once to create one branch for this feature.&lt;/li&gt;
      &lt;li&gt;Make all the changes needed to complete the feature on this one branch.&lt;/li&gt;
      &lt;li&gt;Open &lt;u&gt;one, often large PR&lt;/u&gt;.&lt;/li&gt;
      &lt;li&gt;Wait for review, and approval.&lt;/li&gt;
      &lt;li&gt;Merge the feature branch back into main.&lt;/li&gt;
      &lt;li&gt;Only then start new dependent work.&lt;/li&gt;
    &lt;/ol&gt;
    &lt;p&gt;In a feature-branch based workflow, every new (dependent) piece of work is blocked by the review and merge of the previous PR. If reviews are slow—or PRs are large—development gets bottlenecked.&lt;/p&gt;
  &lt;/div&gt;
  &lt;div class=&quot;col-md-6&quot;&gt;
    &lt;h3&gt;Stacked-PR Workflow&lt;/h3&gt;
    &lt;ol&gt;
      &lt;li&gt;Split the feature into smaller, coherent subtasks.&lt;/li&gt;
      &lt;li&gt;Branch off `main` for the first subtask.&lt;/li&gt;
      &lt;li&gt;Open a PR for that subtask. &lt;/li&gt;
      &lt;li&gt;Immediately branch from that branch (not main) for the next subtask.&lt;/li&gt;
      &lt;li&gt;Open a PR for the second subtask, which depends on the first.&lt;/li&gt;
      &lt;li&gt;Repeat for all further subtasks, creating a &lt;u&gt;stack of PRs&lt;/u&gt;. &lt;/li&gt;
    &lt;/ol&gt;
    &lt;p&gt;In a stacked-PR workflow, reviewers now see a sequence of smaller, focused PRs. Once the bottom PR is approved and merged, the stack syncs, and the next PR in line is ready to go.&lt;/p&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;Example: Stacked PRs in Action&lt;/h3&gt;
&lt;p&gt;Imagine we’re working on a customer support system, and we want to add a new feature to
our AI phone call bot: the ability to ask customers for their telephone number.&lt;/p&gt;
&lt;p&gt;Instead of stuffing all changes into one branch and opening a 1,000-line or more PR,
we start by splitting the work into smaller, coherent subtasks.&lt;/p&gt;
&lt;p&gt;One way is to break down the feature itself according to our layered architecture: database, business logic, and UI changes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Database layer&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a new branch &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt; on top of branch &lt;code class=&quot;language-text&quot;&gt;develop&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Implement database changes&lt;/li&gt;
&lt;li&gt;Open a PR for this work&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Business logic&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a branch &lt;code class=&quot;language-text&quot;&gt;fb-business-logic&lt;/code&gt; on top of &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Implement the feature logic&lt;/li&gt;
&lt;li&gt;Open a PR for this work&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;UI layer&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a branch &lt;code class=&quot;language-text&quot;&gt;fb-ui&lt;/code&gt; on top of &lt;code class=&quot;language-text&quot;&gt;fb-business-logic&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Implement the UI changes&lt;/li&gt;
&lt;li&gt;Open a PR for this work&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Because each branch builds on the last, the full feature is always present locally. But reviewers only see the &lt;strong&gt;incremental change&lt;/strong&gt; in each PR.&lt;/p&gt;
&lt;p&gt;This makes reviews easier: reviewers can focus on one coherent piece at a time, which helps them build a better mental model and provide higher-quality feedback.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 753px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/d10a4db9961b7b3d8037f860d62cbfad/87a16/Final-stacked-pull-requests-database-business-ui.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 52.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAKABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAECBf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAHvTRIo/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABBQJf/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQAGPwJf/8QAGhABAAMAAwAAAAAAAAAAAAAAAQARIRAxYf/aAAgBAQABPyFfLlL3pDCUSuP/2gAMAwEAAgADAAAAEJv/AP/EABURAQEAAAAAAAAAAAAAAAAAAAAR/9oACAEDAQE/EFf/xAAVEQEBAAAAAAAAAAAAAAAAAAAAEf/aAAgBAgEBPxCI/8QAGxABAAIDAQEAAAAAAAAAAAAAAQARIVFhQZH/2gAIAQEAAT8QpSl0Ru+zBRiHAFHCGg+SmiUaJ//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Final stacked pull requests database business ui&quot;
        title=&quot;Final stacked pull requests database business ui&quot;
        src=&quot;/static/d10a4db9961b7b3d8037f860d62cbfad/87a16/Final-stacked-pull-requests-database-business-ui.jpg&quot;
        srcset=&quot;/static/d10a4db9961b7b3d8037f860d62cbfad/f93b5/Final-stacked-pull-requests-database-business-ui.jpg 300w,
/static/d10a4db9961b7b3d8037f860d62cbfad/b4294/Final-stacked-pull-requests-database-business-ui.jpg 600w,
/static/d10a4db9961b7b3d8037f860d62cbfad/87a16/Final-stacked-pull-requests-database-business-ui.jpg 753w&quot;
        sizes=&quot;(max-width: 753px) 100vw, 753px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;One commit per PR?&lt;/h3&gt;
&lt;p&gt;Some workflows or tools (like
&lt;a href=&quot;/code-reviews-at-google/&quot;&gt;Google’s Critique or Gerrit&lt;/a&gt;) review each commit as
a separate change, which enforces a strict separation of changes. Gerrit also
supports stacking commits so they can be reviewed individually and submitted
together. While this can be useful, a branch-based stacked PR does not have to
contain only one commit—you can choose the level of granularity that works best
for your team.&lt;/p&gt;
&lt;h2&gt;Manually Stacking PRs&lt;/h2&gt;
&lt;p&gt;If you want to start using stacked-PRs right away and are using a Git based version
control system, then you do not need anything else than a couple of native Git commands, some practice of breaking up work
into smaller subtasks, and quite a bit of patience for syncing changes and handling merge conflicts.&lt;/p&gt;
&lt;p&gt;I describe all the commands, as well as merge and rebase strategies for this in this &lt;a href=&quot;/best-practices/stacked-pull-requests/&quot;&gt;blog post about manually stacking PRs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Yet, because Git was not designed for this workflow, the day-to-day work with manually
stacked PRs means you have to painfully rebase or merge every branch and
resolve cascading conflicts, which often requires
a lot of time-consuming, tedious, and error-prone workarounds.
This limits the gains developers get from a stacked-based workflow.&lt;/p&gt;
&lt;p&gt;Fortunately, over the last years, several tools have been created that ease usage of stacked-PRs workflows.&lt;/p&gt;
&lt;p&gt;So, let’s look at them!&lt;/p&gt;
&lt;h2&gt;Tool-Support for Stacked PRs&lt;/h2&gt;
&lt;p&gt;Modern tools like Graphite, ghstack, git-spice, Git Town, SPR, Sapling, and
Aviator automate much of this process, making stacked PRs practical for
day-to-day development.&lt;/p&gt;
&lt;h3 id=&quot;sapling-by-meta&quot;&gt;Sapling by Meta &lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/facebook/sapling&quot;&gt;Sapling&lt;/a&gt; is Meta’s open-source,
cross-platform, and highly scalable source control system. It is compatible
with Git repositories, but unlike a typical Git workflow, it can represent a
stack as a sequence of commits without requiring a named branch for every
change.&lt;/p&gt;
&lt;p&gt;With
&lt;a href=&quot;https://sapling-scm.com/docs/introduction/getting-started/#submitting-pull-requests&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;sl pr submit&lt;/code&gt;&lt;/a&gt;,
Sapling creates or updates one GitHub pull request for every commit in the local
stack. These are overlapping PRs that all target the main branch. Sapling
therefore also provides &lt;a href=&quot;https://reviewstack.dev/&quot;&gt;ReviewStack&lt;/a&gt;, a review
interface designed to display this type of stack more clearly.&lt;/p&gt;
&lt;h3&gt;SPR&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/ejoffe/spr&quot;&gt;SPR is an open source CLI tool&lt;/a&gt; that allows you to create and manage stacked pull requests.
The approach behind SPR is that each commit (yes each commit) becomes its own pull request.
While this might seem excessive for you, this is also how tools like Gerrit or Critique work, which are used by Google, and lead to smaller, more focused PRs.
When using SPR, you do not have to create new branches. Instead, you create one branch, and then
commit your work, subtask, by subtask to the branch.
SPR takes care of opening up PRs for each of the commits, while using the commit message as the
PR title.
It’s important that you keep using the tool for merging, as otherwise, you could end up merging changes together in an order that probably makes no sense.&lt;/p&gt;
&lt;h3&gt;ghstack&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/ezyang/ghstack&quot;&gt;ghstack&lt;/a&gt; also uses a commit-based model: you
prepare a series of commits and it submits each commit as a separate GitHub pull
request. It uses synthetic base and head branches so that every PR shows only
its own incremental change, and stacks must be landed with &lt;code class=&quot;language-text&quot;&gt;ghstack land&lt;/code&gt;
rather than the normal GitHub merge button.&lt;/p&gt;
&lt;p&gt;Recent versions can optionally use Claude or Codex to generate descriptions for
stack updates. For an existing PR, the agent receives the interdiff—the change
since the last submitted version—rather than the entire PR.&lt;/p&gt;
&lt;h3&gt;git-spice&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/abhinav/git-spice&quot;&gt;git-spice&lt;/a&gt; is an open-source tool for
creating, navigating, restacking, and submitting stacks of Git branches. Unlike
several GitHub-specific tools, it supports pull or merge requests across
GitHub, GitLab, Bitbucket, Gitea, and Forgejo. It also works locally without an
external service until you push or pull from a remote repository.&lt;/p&gt;
&lt;h3&gt;Git Town&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.git-town.com/stacked-changes.html&quot;&gt;Git Town&lt;/a&gt; provides additional
Git commands for creating, synchronizing, shipping, and cleaning up branches.
It’s compatible with branching models like GitHub Flow, Git Flow, GitLab Flow,
and trunk-based development.&lt;/p&gt;
&lt;p&gt;For stacked changes, Git Town can append or prepend branches, change parent
relationships, reorder or combine adjacent branches, and detach a branch from a
stack. It also automates the tedious work of keeping the stack synchronized
with &lt;code class=&quot;language-text&quot;&gt;git town sync&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Aviator&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.aviator.co/stacked-prs&quot;&gt;Aviator’s open-source CLI&lt;/a&gt; manages
parent-child relationships between GitHub pull requests, synchronizes dependent
branches, and integrates stacks with a stack-aware merge queue.&lt;/p&gt;
&lt;p&gt;Aviator has also started connecting stacked PRs directly with agentic
development. Its &lt;a href=&quot;https://www.aviator.co/changelog&quot;&gt;agent plugin&lt;/a&gt; teaches coding
agents to use the stack-aware &lt;code class=&quot;language-text&quot;&gt;av branch&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;av pr&lt;/code&gt;, and &lt;code class=&quot;language-text&quot;&gt;av sync&lt;/code&gt; commands
instead of raw Git operations. Aviator Runbooks can execute a larger task in
steps and
&lt;a href=&quot;https://docs.aviator.co/runbooks/how-to-guides/using-stacked-prs&quot;&gt;produce one stacked PR per step&lt;/a&gt;,
giving human reviewers incremental checkpoints instead of one large
agent-generated change.&lt;/p&gt;
&lt;h3&gt;Graphite&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://graphite.com/&quot;&gt;Graphite&lt;/a&gt; builds on top of Git and integrates with
GitHub. Its workflow packages small changes as
&lt;a href=&quot;https://graphite.com/docs/learn-to-stack&quot;&gt;stacked PRs&lt;/a&gt; that can be created with
a CLI and reviewed in a dedicated web interface. Graphite also provides a
stack-aware merge queue that lands approved changes in the correct order.&lt;/p&gt;
&lt;p&gt;In December 2025,
&lt;a href=&quot;https://www.graphite.com/blog/graphite-joins-cursor&quot;&gt;Graphite announced that it was joining Cursor&lt;/a&gt;
while continuing to operate as an independent product. The integration now
brings agent-generated pull requests into the same review and merge environment,
while Graphite continues to invest in its stacked-PR workflow.&lt;/p&gt;
&lt;h2&gt;Stacked PRs in Agentic Development&lt;/h2&gt;
&lt;p&gt;Stacked PRs can be particularly useful when a coding agent is working on a
large task whose parts genuinely depend on one another. A stack turns the
agent’s output into bounded review units: for example, a schema change, followed
by service logic, followed by the UI. Reviewers can validate the foundation
before approving the layers built on top of it.&lt;/p&gt;
&lt;p&gt;However, agent-generated work should not be stacked merely because several
agents are working in parallel. Independent tasks are usually better handled as
independent branches and PRs. A stack is most useful when it represents a real
dependency chain and a coherent review narrative.&lt;/p&gt;
&lt;p&gt;Early research on agent-authored pull requests reinforces the importance of
keeping those review units manageable, but does not yet prove that stacked
agent PRs outperform monolithic ones. A
&lt;a href=&quot;https://arxiv.org/abs/2602.19441&quot;&gt;2026 empirical study&lt;/a&gt; found that larger
agent-authored changes and force pushes were associated with a lower likelihood
of merging, while reviewer engagement had the strongest relationship with
successful integration. Another
&lt;a href=&quot;https://arxiv.org/abs/2605.02273&quot;&gt;2026 study of review activity&lt;/a&gt; found that
many agent-authored PRs had no recorded review and that review comments were
often produced by other agents. Splitting work into a stack can improve
reviewability, but it does not by itself guarantee human oversight.&lt;/p&gt;
&lt;p&gt;For agent-generated stacks, keep the stack shallow, give each PR one clear
purpose, use stack-aware tooling to avoid cascading rebases, and make a human
author responsible for reviewing each layer before requesting review from
others.&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;Stacked pull requests allow developers to break large, hard-to-review changes into a
series of smaller, dependent PRs. Instead of waiting for one PR to merge before starting
the next, developers can keep working by branching on top of previous work.
Reviewers benefit from focused, incremental changes that are easier to understand
and provide feedback on. While managing stacked PRs manually can be tedious,
modern tools like Graphite, ghstack, git-spice, SPR, Git Town, Sapling, and
Aviator automate much of the workflow. Used for genuine dependency chains,
stacks can enable earlier feedback and smoother collaboration without requiring
reviewers to digest one monolithic change.&lt;/p&gt;
&lt;div class=&quot;row&quot;&gt;
  &lt;div class=&quot;col-md-6&quot;&gt;
    &lt;h3&gt;Feature-Branch Workflow&lt;/h3&gt;
    &lt;ol&gt;
      &lt;li&gt;One branch for the whole feature&lt;/li&gt;
      &lt;li&gt;One often large PR&lt;/li&gt;
      &lt;li&gt;Blocked until review + merge&lt;/li&gt;
    &lt;/ol&gt;
    &lt;p&gt;&lt;strong&gt;Downside:&lt;/strong&gt; Long-lived branches, big PRs, delayed integration.&lt;/p&gt;
  &lt;/div&gt;
  &lt;div class=&quot;col-md-6&quot;&gt;
    &lt;h3&gt;Stacked-PR Workflow&lt;/h3&gt;
    &lt;ol&gt;
      &lt;li&gt;Multiple short-lived branches&lt;/li&gt;
      &lt;li&gt;Each subtask has its own PR&lt;/li&gt;
      &lt;li&gt;Parallel development + review&lt;/li&gt;
    &lt;/ol&gt;
    &lt;p&gt;&lt;strong&gt;Potential benefit:&lt;/strong&gt; Earlier feedback, less context
    switching, and changes that stay closer to &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If your team is struggling with large PRs, painful reviews, or stale feature branches, give stacked PRs a try.&lt;/p&gt;
&lt;p&gt;👉 Your future self (and your reviewers) will thank you.&lt;/p&gt;
&lt;p&gt;So, happy stacking!&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Stacked Pull Requests - The Complete Guide for Developers”: &lt;a href=&quot;https://www.awesomecodereviews.com/best-practices/stacked-prs/&quot;&gt;https://www.awesomecodereviews.com/best-practices/stacked-prs/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2026-07-24T11:26:38+02:00&quot;&gt;July 24, 2026&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Using Copilot for Automated Code Reviews]]></title><description><![CDATA[One of the most intriguing applications of GitHub Copilot is its potential to assist in code reviews. In this tutorial, we’ll explore how…]]></description><link>https://www.awesomecodereviews.com/automation/copilot-review/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/automation/copilot-review/</guid><pubDate>Fri, 22 Nov 2024 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;One of the most intriguing applications of GitHub Copilot is its potential to assist in code reviews.&lt;br&gt;
In this tutorial, we’ll explore how Copilot helps you understand code, suggest improvements,
explain code, and answer specific questions about the code under review.&lt;/p&gt;
&lt;p&gt;You’ll learn two main ways to use Copilot:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;#copilot-in-ide&quot;&gt;Copilot in the IDE&lt;/a&gt; (Visual Studio Code)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#copilot-on-github&quot;&gt;Copilot on GitHub&lt;/a&gt; for reviewing pull requests (currently in beta).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Along the way, I’ll share my thoughts on the
&lt;a href=&quot;#review-workflows&quot;&gt;use cases and workflows for AI-assisted code reviews&lt;/a&gt;,
as well as the &lt;a href=&quot;#trust&quot;&gt;weaknesses&lt;/a&gt; of this approach.&lt;br&gt;
While GitHub Copilot can transform how we conduct code reviews, we will see that
human oversight remains essential throughout the process.&lt;/p&gt;
&lt;h2&gt;GitHub Copilot&lt;/h2&gt;
&lt;p&gt;GitHub Copilot is a coding assistant that uses large
language models (LLMs) under the hood.
GitHub Copilot is a coding assistant powered by large language models (LLMs).
It integrates seamlessly with various integrated development environments (IDEs),
providing developers with real-time suggestions, code completions, and review functionality.&lt;br&gt;
Recently, Copilot has also become available (in beta) directly on GitHub,
where it assists developers in reviewing pull requests (PRs).&lt;/p&gt;
&lt;h2&gt;Code Under Review&lt;/h2&gt;
&lt;p&gt;In this tutorial, you’ll explore how to use GitHub Copilot to review code effectively.&lt;br&gt;
Let’s start with a snippet of code from a file named &lt;code class=&quot;language-text&quot;&gt;auth.js&lt;/code&gt;.
Below, you’ll find the first code sample we’ll review.&lt;/p&gt;
&lt;p&gt;You don’t need to analyze the code in detail right now, but take a
quick look.&lt;/p&gt;
&lt;p&gt;Do you notice any opportunities for improvement?&lt;/p&gt;
&lt;br/&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; React&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; createContext&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; useState&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; useEffect &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;react&quot;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; firebase &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;gatsby-plugin-firebase&quot;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; AuthContext &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;createContext&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token function-variable function&quot;&gt;AuthProvider&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; children &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;user&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; setUser&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;useState&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

  &lt;span class=&quot;token function&quot;&gt;useEffect&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    firebase&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;auth&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;onAuthStateChanged&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;user&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;setUser&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;user&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;AuthContext&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Provider value&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; user&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; setUser &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;children&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;AuthContext&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Provider&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;default&lt;/span&gt; AuthProvider&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&quot;copilot-in-ide&quot;&gt;Copilot in the IDE&lt;/h2&gt;
&lt;p&gt;As mentioned earlier, GitHub Copilot is available in IDEs and on GitHub itself.&lt;br&gt;
We’ll begin by reviewing this piece of code within the IDE and later compare it to the review experience on GitHub in the PR view.&lt;/p&gt;
&lt;p&gt;In Visual Studio Code, a small context menu provides access to Copilot’s AI-powered capabilities.&lt;br&gt;
This menu allows you to &lt;em&gt;Explain&lt;/em&gt;, &lt;em&gt;Fix&lt;/em&gt;, or start a chat (&lt;em&gt;Add File to Chat&lt;/em&gt;) about a specific piece of code.&lt;br&gt;
You can also use it to generate documentation or tests with the help of AI.&lt;br&gt;
Recently, Copilot introduced a &lt;em&gt;Review and Comment&lt;/em&gt; option for reviewing code directly in the IDE, which is what you’ll use today to get started.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/07218c6a0c0cec37003d48199c15aa7c/229ad/co-pilot-inIDE-menu.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 57.666666666666664%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAABYlAAAWJQFJUiTwAAABk0lEQVQoz42TW0vrQBRG5///BUF8Pfgi+HIePAqWamvbdHKbZNI0mVxFrQqFFnr9ZG+JRLCnDiwmYYbFN3vPCMsaot/vwfddlGWOosh4PkSeG2az2YDGfr9He4jh8AFhqBBFIcv+BwmNSZCmU6zXa5btdrtvCKU8eJ7DCWlzO+VPUtpDCVer1Tfhdrv9FPZ6dyzzfQ9B4HNaQuuAU7eJJxEiHUIpH6HWCMIQvlIwWYayqlEUJYRljeC6NguyLOXjUIqfoHViEgVQzgCJdlFnEzwWU7xUCZ6qBKLTuUW32+HGkJiOU1XFwaZkZgpbaVzcZ7hyZ7j23/DPm+HSmuGvfIYYjQYYj0egpFRLEh6qH9e2SCGDGKc3JU6uDE5vCpwP33F2944//dfPhLY9RpLEfNxjQjpyPNHw5APkoAtlD/BUpZg9GrzUBsJxJBe83eFjRJGGlDZsx2HieIrUGEaQrK5L3pjnx2VN4+bzOZbLJRaLxRf0L+jKUBOOvZBmvSlL+2LT3HwLKa2vhL95KW1h8/TafADD3Gh3u5GIdAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Screenshot of the context menu of Copilot&quot;
        title=&quot;Screenshot of the context menu of Copilot&quot;
        src=&quot;/static/07218c6a0c0cec37003d48199c15aa7c/c1b63/co-pilot-inIDE-menu.png&quot;
        srcset=&quot;/static/07218c6a0c0cec37003d48199c15aa7c/5a46d/co-pilot-inIDE-menu.png 300w,
/static/07218c6a0c0cec37003d48199c15aa7c/0a47e/co-pilot-inIDE-menu.png 600w,
/static/07218c6a0c0cec37003d48199c15aa7c/c1b63/co-pilot-inIDE-menu.png 1200w,
/static/07218c6a0c0cec37003d48199c15aa7c/229ad/co-pilot-inIDE-menu.png 1356w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;br/&gt;
&lt;h2&gt;Review and Comment&lt;/h2&gt;
&lt;p&gt;Previously, the primary option for reviewing code with GitHub Copilot was
to &lt;a href=&quot;#review-chat&quot;&gt;start a chat with the LLM&lt;/a&gt;. This was particularly useful
when you wanted an exploratory and interactive approach to understanding
and improving your code.&lt;/p&gt;
&lt;p&gt;Now, with the &lt;em&gt;Review and Comment&lt;/em&gt; option, you have access to a more
direct, guided, and structured way to review your code.&lt;br&gt;
To start a guided review, select the parts of the code you want to examine
and ask GitHub Copilot to &lt;em&gt;Review and Comment&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Copilot then opens a review interface that highlights suggested changes
line by line within the file under review.&lt;br&gt;
This interface resembles tools commonly used for refactoring or
resolving merge conflicts, making it intuitive for developers.&lt;/p&gt;
&lt;p&gt;Here’s an example of the interface in action while reviewing
the &lt;code class=&quot;language-text&quot;&gt;auth.js&lt;/code&gt; file in the IDE:&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/879b846a6b7195803513e20323e65170/8454b/co-pilot-inIDE-review-03.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 75.66666666666666%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAACXBIWXMAABYlAAAWJQFJUiTwAAACk0lEQVQ4y32UC2+jRhRG+f8/p+omabubROmmrdRstvEDP3H9wBgDwzDMMOZh+1SQrLSRvL3S0ffNg8sdwR2nqiqMtcR7TRL6xOGGQudUdY1SB8qy4dgAnHkX5/N7OFMfzzi5rQhTQxDn/D1Z83W6pjcNmW92eOsds1XAdJXgBQXLIGHuRyyCHFsdqZoTZd1y7LD1CccPE/qjOcPpgpfxv4wXG/x9SiQLImnYCsM+NeylZS+/+QKpD2SmRKiCSCj8XUKqDE4cRWz9DYN+j5evzywXHnG070jiiCTaI960HXc+joj2r3uit72ZlNiiwNHaIESK67oMXRd3PKbX79MfDBi4Lv2h2+lwNOrmW//S67FcrQmCHb6/ZRsEiDSleE2okVIyn81YjCcsRiNUnKATgYqiDhmGZK1P0047LwRGa4wxHblSnTp5niOzjCQVTBZTRrMRrjdm7E0YToe4sxGeN2W59Fj4S7zlnNliirdeEIoIPw5ZR7tOc6NxrLVUVYk9WLJCk1vTIYwiLXL0oaBuavL2JEqR5fkrrc+yrphOpXytcDSe8tPVR65/vefDzS2/fXrg/uFPrm7uuP7lnqubW36+/kQYhtjCoHP1HTlav5Grbt2ZeBtuP3/h7o9nPv7+xMNf//D4NOD28Qt3j88d7fo2FMjcIjKDUO9JVdHNK21x2p+xbYTcVGhb8aM4As0JquOZsrlM1ym2rDjUFXGomc9jAqGQ2iKNpUglUuSIrECpDKU0x6b51nsXX+wUZc2hbgjjjCd3xefeiqkfs4wkKs2wRYmxFe3Hs/bA8Xh6a+XzRRxb1bRJM2OpTw31+dSV3vbp6XIR3YM/CseUFeZQoUWNTip0UpJlEpkK2pvoUjX/l/Q/121sxHFJL6IAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Copilot in action&quot;
        title=&quot;Copilot in action&quot;
        src=&quot;/static/879b846a6b7195803513e20323e65170/c1b63/co-pilot-inIDE-review-03.png&quot;
        srcset=&quot;/static/879b846a6b7195803513e20323e65170/5a46d/co-pilot-inIDE-review-03.png 300w,
/static/879b846a6b7195803513e20323e65170/0a47e/co-pilot-inIDE-review-03.png 600w,
/static/879b846a6b7195803513e20323e65170/c1b63/co-pilot-inIDE-review-03.png 1200w,
/static/879b846a6b7195803513e20323e65170/8454b/co-pilot-inIDE-review-03.png 1798w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;br/&gt;
&lt;h3&gt;Line by Line Review&lt;/h3&gt;
&lt;p&gt;The AI suggested code change is embedded directly in the code. Copilot
injects the review interface just below line 10, which is the main line of
code this code review comment addresses.&lt;br&gt;
The review interface highlights the original lines in red and the
suggested changes in green, following a familiar diff-style format.&lt;/p&gt;
&lt;p&gt;You can either accept the changes or discard them and move to the next suggestion.&lt;br&gt;
What stands out to me is that Copilot also provides a brief explanation of the
reasoning behind each suggestion, making it easier to understand
the proposed improvements.&lt;/p&gt;
&lt;p&gt;However, one usability issue I’ve encountered is that accepting a change
automatically moves you to the next one.&lt;br&gt;
This behavior means you can’t review or verify the outcome of the change
Copilot applied.&lt;br&gt;
I’d prefer an option to accept the change and stay on the same line
(e.g., line 10) to inspect the result before proceeding.&lt;/p&gt;
&lt;p&gt;Overall, the &lt;em&gt;Review and Comment&lt;/em&gt; functionality is straightforward and
enables a highly structured approach to code review, aligning well with
automated code review practices.&lt;/p&gt;
&lt;h2&gt;Let Copilot Explain Code&lt;/h2&gt;
&lt;p&gt;Another way Copilot can assist in a review is by explaining the code.&lt;br&gt;
This feature helps you build a mental model of the code changes, improving
your ability to provide meaningful feedback during the review process.&lt;/p&gt;
&lt;p&gt;To prompt Copilot for an explanation, select the code and right-click to
open the context menu. Then, click &lt;em&gt;Explain&lt;/em&gt;.&lt;br&gt;
The executed prompt is: &lt;em&gt;“@workspace /explain Write an explanation for the active selection as paragraphs of text.”&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This prompt triggers GitHub Copilot to generate a detailed explanation
of the selected code, as shown in the screenshot below.&lt;br&gt;
The explanation highlights objects, components, and function calls,
making it easier for developers to associate the description with the code itself.&lt;br&gt;
Additionally, functions are clickable, linking you directly to the file
where they are defined.&lt;/p&gt;
&lt;p&gt;After the explanation, a chat interface appears, allowing you to interact
further with the LLM about the code.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/553d12cee4825ff92977c262aaabd3d8/bb33f/co-pilot-explanation2.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 62.66666666666667%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAABYlAAAWJQFJUiTwAAACMklEQVQ4y21Ta4+bMBDk//+2qh8a5ZoAJrxyHCQEsA1+M9U6l1Ov6kqjBczOPmadvF+vuI8j2rZCXTEMtxu44NDGgguJ6/Ud9/sdQojob3TOOZZliaDnYRjQ9z2maUKihYXoFLp+wThoDO2AuR+x3GbM/QPrarGtFkYb9EOPy+XyDWV5QV3XX4kSpwPsEsC5wyQtVmWhJce6TFilxL7vCCFET0FZmqKqKlyKIoIVBZqmwTiOseJE6x2PwWOcZjzmOyYucRvusV0fEG3fCQFCSJR1A1Yw1E0LVlYoCha/tW2Lx+OBxHn6kWPhC9Sq4KyGNQrWGni/w3uPQAghVsCOR2SHAy7nFCzN4uwINMfYsnUegguIVcY5abVC6xVq41DKw+hnAjIiPJ9OOB4OyLMMLM+R5zmKooieRpI45yEnhYlvkNpAGQcvJbbNQhH5tsL7gB17rCDLc5zP54g0TZFmWRSFQFUm1nvITaLuJzzEBq4MvDGgRM45eOeeonxWSKIwxpBRhYyhqhtUVR2FiS1r4xFsQIjzcrDORkX/Nnon0C6SwmVZRhARK57rQ4RSCCSOyNYdXuwwsUURK/qX8DXD0+mEt7c3nM5nlFWFpr3GJET4+5QiIRWdd3DBfQWSt9bGlskTKAm1RIFt26D76NF1HYbbHV33EW/Rj5+/kNBCEuiQ9khKCaUUtNbRb9v2RSilwDxPMMZ86+I1ErKEDl43gbz7FOF/RskIJormnjsaQkz+wh/qxN7UJ2s7NQAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Explanation of the auth.js component&quot;
        title=&quot;Explanation of the auth.js component&quot;
        src=&quot;/static/553d12cee4825ff92977c262aaabd3d8/c1b63/co-pilot-explanation2.png&quot;
        srcset=&quot;/static/553d12cee4825ff92977c262aaabd3d8/5a46d/co-pilot-explanation2.png 300w,
/static/553d12cee4825ff92977c262aaabd3d8/0a47e/co-pilot-explanation2.png 600w,
/static/553d12cee4825ff92977c262aaabd3d8/c1b63/co-pilot-explanation2.png 1200w,
/static/553d12cee4825ff92977c262aaabd3d8/d61c2/co-pilot-explanation2.png 1800w,
/static/553d12cee4825ff92977c262aaabd3d8/bb33f/co-pilot-explanation2.png 2208w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;This &lt;em&gt;chat interface&lt;/em&gt; is also a great starting point when you want a
more exploratory experience with the LLM and the code.&lt;/p&gt;
&lt;h2&gt;Inline Chat with Copilot&lt;/h2&gt;
&lt;p&gt;Another way to interact with GitHub Copilot in the IDE is by using
the inline chat (&lt;em&gt;Editor Inline Chat&lt;/em&gt;) interface, which provides
explanations directly within the file view.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1073px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/72655e8072d07eac4f3543a20a702199/e24fe/copilot-inlineEditor2.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 21%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAYAAACOXx+WAAAACXBIWXMAABJ0AAASdAHeZh94AAAAsklEQVQY012PzY7CMAwG+/5vuGi5gFChTYLjOH/lMKumIKE9jGSN7M/2VGvD4h2TiKVINiVFj+VM1I5opdZKa53W2j8Ot2d83LRtG6rKsjpCEIL3OOfw3uHdQi1G78fQCB7hR11KIecy+kMImBnTLkWU03nm5/fC9XJnnj2rTyxux1hWHYuezzT86hwSdYR+03tnEpFx4WO+4YMn5U6yRkwH8n7bUsI+XpVSKq/Xxv7hN3+MNzNj0v2bngAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Inline chat of Copilot&quot;
        title=&quot;Inline chat of Copilot&quot;
        src=&quot;/static/72655e8072d07eac4f3543a20a702199/e24fe/copilot-inlineEditor2.png&quot;
        srcset=&quot;/static/72655e8072d07eac4f3543a20a702199/5a46d/copilot-inlineEditor2.png 300w,
/static/72655e8072d07eac4f3543a20a702199/0a47e/copilot-inlineEditor2.png 600w,
/static/72655e8072d07eac4f3543a20a702199/e24fe/copilot-inlineEditor2.png 1073w&quot;
        sizes=&quot;(max-width: 1073px) 100vw, 1073px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;One challenge with inline prompts is that the chat window is quite small,
while the explanations or suggestions are often lengthy.&lt;br&gt;
This results in extensive scrolling, which can feel cumbersome and
less user-friendly, as shown in the screenshot below.&lt;/p&gt;
&lt;p&gt;Fortunately, you can prompt Copilot to &lt;em&gt;View in Chat&lt;/em&gt;, which opens
the conversation in a larger, dedicated window (in my case, on the right-hand side).&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/6c8079f040cefdb1353b142e90c579f3/21e8f/inline-explanation-scroll.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 58.00000000000001%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAABYlAAAWJQFJUiTwAAAB20lEQVQoz5WT227UMBCG8/4Pwgtwg0C9APWuKnBREFoh1N026zg+J85xnXwo3qWqECpg6fc/Y82M5uRiWhJ9hMf7EakEtXzEmyPaBR72FaKSxC6xrvzTKUzT4b2gjZFmWIjDRBtb2r6j7WLGvCTmtDKl5a8olKoRQuK8xzqPaSJH7VE24ENDP0wsK6RlZVlfwtmmSCnR9x1aa2qlkSZg2oFhTrmEdVlYUjrzM/yub3FgpdicQgiIWiGE4OHhgKolsqqQUlLXNVVVZVZKZf4lb++bT1mWWGvPPdyuLfpmcHZQyIuDMSYbbuyce9Ktc7miLFuLcz5n+RRw60ElBPv7ew6HQ8bxeMxZVpXImUhZ5UyqS+bPK2hCYJ6mc8k58nLC+oB2HuubLLumRVmf10dZR21c1jfW1iO1zaiUye3ybZcHU+zqjlc3Jde3X/h4t+Nut+fT1++UyjMDwwmGBGNaGdLKmGWI4wnb9ijfYkIkTgunbco73fPmm+Pd9Q2vrz7w9v0tV9ef2ZeCbhgJsSPEgdCdaPqJpuvxcSKOiXnhCeNlT4tpnlnnkR+l5KAdxgWs73HOXAYlqaRG6h5jW7RWiDrg2/G8VuuawYWLOE7Mc6KzI8sp8T9n/cN//AmgL5kUZBoheAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Long inline explanation of Copilot&quot;
        title=&quot;Long inline explanation of Copilot&quot;
        src=&quot;/static/6c8079f040cefdb1353b142e90c579f3/c1b63/inline-explanation-scroll.png&quot;
        srcset=&quot;/static/6c8079f040cefdb1353b142e90c579f3/5a46d/inline-explanation-scroll.png 300w,
/static/6c8079f040cefdb1353b142e90c579f3/0a47e/inline-explanation-scroll.png 600w,
/static/6c8079f040cefdb1353b142e90c579f3/c1b63/inline-explanation-scroll.png 1200w,
/static/6c8079f040cefdb1353b142e90c579f3/21e8f/inline-explanation-scroll.png 1684w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;br/&gt;
&lt;h2&gt;Asking Copilot for Changes&lt;/h2&gt;
&lt;p&gt;The inline interface is particularly effective for prompting Copilot to make changes.&lt;br&gt;
For example, you can ask Copilot, “Change this function call to a more secure one.”&lt;br&gt;
It will then present you with suggested changes, though without
much explanation by default.&lt;/p&gt;
&lt;p&gt;However, the interface initially only displays the newly generated code,
not the original code.&lt;br&gt;
This can make it difficult to compare and evaluate whether the suggested
change is truly helpful.&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1042px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/9bdd387048ac73a3448b8454ce2f2464/5819f/inline-change-request.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 29.666666666666668%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAABJ0AAASdAHeZh94AAABE0lEQVQY03XO3U7CQBAF4L7/63gjERJAiUSIJlZgi9At0Fbp/nS3211Ke3EINRrRcPFlzlzM5HgH51C6GkxWULpEqQtUVYWmaS7UdX3V8Xj8yd55WczmWK23oHSDiEbYbndI0w8kSYo4TtrMubhKStlOrTW8c5tsn0EIAaUUjClRFOaCMQbWWljr/nHOtbd5rlAUBbymPmA0KXFzl6DT6+O2O0SnN2xbqTwH57LFuABjop1/G+73Wev81GNKw1/6GD0+4WE6wP2ki/50gLE/xeR1DBLOsIwICCWYhwQLSjBbB1isXhBufBAaIIjeQMJnxNkSnlQau5gifA/ApEAmOFKeI2ESn1ygtDlKd8nYL7/373wCYBnAL9V+nGsAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Inline Suggestion of Copilot&quot;
        title=&quot;Inline Suggestion of Copilot&quot;
        src=&quot;/static/9bdd387048ac73a3448b8454ce2f2464/5819f/inline-change-request.png&quot;
        srcset=&quot;/static/9bdd387048ac73a3448b8454ce2f2464/5a46d/inline-change-request.png 300w,
/static/9bdd387048ac73a3448b8454ce2f2464/0a47e/inline-change-request.png 600w,
/static/9bdd387048ac73a3448b8454ce2f2464/5819f/inline-change-request.png 1042w&quot;
        sizes=&quot;(max-width: 1042px) 100vw, 1042px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;To address this, you can enable the &lt;em&gt;Toggle Changes&lt;/em&gt; option, which shows a
side-by-side comparison of the original and new code—similar to what many
developers are accustomed to in code reviews.&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1031px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/c833c8f4300797d7a2b18bd4441e2dbd/23592/inline-change-request-toggle-changes.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 31%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAABJ0AAASdAHeZh94AAABKElEQVQY053I7U+CQADHcf7/f6fmVunW1rKWqSgm6Xw4PLhDOA4DxHTVt2Vttl724rPfg1PXFSaNEXJDFGckOia3Odu6pv4H5+3tHbGYsRJzlNLoL1qjIkUoQ6QMCcOQJEkxJsOk5sSY45em5keKczjsUUnFLCgRUiH1mpWK2RQlu/2e+vX1j9O33e2O2768kOUb8qLA+Xg/4A8zGucBV40WzUaTi7NLJoMR6Uqi5kv0QrBeBiRidezxT89kdGR/cWxRoYMx/sMNXueG0WMLr3uN272l124x7reZDLtMvR5Tz8UfdBm7fZ7de0K/g/CHLH2X5egONXNxjN0gdMDoyWMuBYtIMAklU6WYRRGmiMmrBFsmZGWCrb4yJStibBmTletvhcZWaz4BlJi7fWrw9bEAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Inline Suggestion of Copilot&quot;
        title=&quot;Inline Suggestion of Copilot&quot;
        src=&quot;/static/c833c8f4300797d7a2b18bd4441e2dbd/23592/inline-change-request-toggle-changes.png&quot;
        srcset=&quot;/static/c833c8f4300797d7a2b18bd4441e2dbd/5a46d/inline-change-request-toggle-changes.png 300w,
/static/c833c8f4300797d7a2b18bd4441e2dbd/0a47e/inline-change-request-toggle-changes.png 600w,
/static/c833c8f4300797d7a2b18bd4441e2dbd/23592/inline-change-request-toggle-changes.png 1031w&quot;
        sizes=&quot;(max-width: 1031px) 100vw, 1031px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;If you’re unsure about the suggested changes, you can also ask Copilot
to explain its suggestions, adding clarity and helping you assess their value.&lt;/p&gt;
&lt;h2 id=&quot;review-chat&quot;&gt;Chatting with Copilot About the Code&lt;/h2&gt;
&lt;p&gt;One of the most common ways LLMs assist developers today is through
“traditional” chat interfaces.&lt;br&gt;
In this interface, developers can ask the LLMs questions about the
code or explore it interactively.&lt;br&gt;
GitHub Copilot also offers this method of interaction, providing
a versatile way to engage with the code.&lt;/p&gt;
&lt;p&gt;The inline chat we discussed earlier is another representation of
this chat interface.&lt;br&gt;
Similarly, the &lt;em&gt;Explain&lt;/em&gt; option brings you directly into this
interface with a prefilled standardized prompt, enabling a seamless
transition between exploration and explanation.&lt;/p&gt;
&lt;h2 id=&quot;copilot-on-github&quot;&gt;Copilot to Review PRs on GitHub&lt;/h2&gt;
&lt;p&gt;The GitHub Copilot experience for pull request reviews is currently similar
to the chat functionality in the IDE or tools like ChatGPT on the web.&lt;br&gt;
However, it provides a less directed and structured approach compared to
the &lt;em&gt;Explain and Comment&lt;/em&gt; interface available for automated code reviews
in the IDE.&lt;/p&gt;
&lt;p&gt;There are several ways to trigger Copilot directly on GitHub during a PR review.
For instance, you can click on a line of code, which opens a small
Copilot context menu.&lt;br&gt;
From there, you can select options such as &lt;em&gt;Explain&lt;/em&gt; or
&lt;em&gt;Attach to current thread&lt;/em&gt; to add Copilot’s response to an existing conversation.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 951px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/8fec33e9dfc9c30c21c0f56bbf1ea004/9b379/copilot-context-menu-github.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 51.66666666666666%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAABxElEQVQoz43Ry3KiQBhAYd//tbJKxQt3GgQBNVEQaLrVKGA8U2BqYmU2s/iqoReHv+nJpujwNiXOdke2U6QfknWuOaiW+nSjPj6Uuh9Vw6oG3fheNC2bXLMrz6yLC5O3fc1LkTPdv+NtYubbCGO3xsjfMYoHs/hANDmhLHBVSXxtiC8/lp+S1bXBkTUTSycYnYepXEIlsJWPKx3MxmcuQ2aVwFCCoE8Q3QrRJePzb+EtwTgmTCyVsbj4GNIjkD6+dLBrG1sFmNUSW8WIa0LYZz+6fy1vGabOvoNXj4V08Q4+s73FvHSw9JJFGeBdVmMk6NIf39GgT0di2LulLPQwoc6YnR0MLTCaJdPCx1Ixjk5wVIolI+xThKkEZiMI2vTvB4boqtuS9O+sPrfE+e4RnJ6GoI84hgTXmLB/TCLaQTIeeVifQ8NkQ6xuGtq25et+5+t2Z2LrjLejzbzxcSqP1+gFcz/DrmwMHWMfQywV4Jyip6M/gnG74dBUlLImrw5UunkEZ2ebhfYQfYp/iQjamKBbjT/62TB5eHvSpyyHC2kzoj7D0ikTU254lR5vuYdXR7h1hF2HI/eU4Z7X/8X7XDOXGX8A9e7e+THeUwcAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Context menu of Copilot on GitHub&quot;
        title=&quot;Context menu of Copilot on GitHub&quot;
        src=&quot;/static/8fec33e9dfc9c30c21c0f56bbf1ea004/9b379/copilot-context-menu-github.png&quot;
        srcset=&quot;/static/8fec33e9dfc9c30c21c0f56bbf1ea004/5a46d/copilot-context-menu-github.png 300w,
/static/8fec33e9dfc9c30c21c0f56bbf1ea004/0a47e/copilot-context-menu-github.png 600w,
/static/8fec33e9dfc9c30c21c0f56bbf1ea004/9b379/copilot-context-menu-github.png 951w&quot;
        sizes=&quot;(max-width: 951px) 100vw, 951px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;/br&gt;
&lt;h3&gt;AI Code Explanation for Code Review&lt;/h3&gt;
&lt;p&gt;When you click &lt;em&gt;Explain&lt;/em&gt;, it triggers a pop-up window that resembles
the familiar chat interface.&lt;/p&gt;
&lt;p&gt;Using AI to explain code is an excellent use case
during a code review.&lt;br&gt;
It helps the reviewer understand the code more effectively
and build a mental model of the changes.&lt;br&gt;
However, this feature does not provide improvement suggestions
from Copilot, as shown in the example below.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 961px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/db3fbc75a218a4ffdae5bec8be5a8da8/024d6/copilot-gitub-chat.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 63.66666666666666%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAAAsTAAALEwEAmpwYAAACmElEQVQ4y32SyY7jNhRF/f/rLIIEyCLoz+hFUEg6SKpcdnnQZMlDla1ZMilSogbLJ7AKSO/6AQcX4AMvLt/j7JCUuFFIViriTJAUFVUz0HTjRN2O1KYny3OSNCUvi0mFkiQqp+kMt9tI1/X0w8DsKU6ZpyHWx4HF5cAi/GARhyyzmGUas0hCElUx1QBaaGRRoa6a6qqQQjKO49Q2bcts0Vr8nWxxyy1rYbEp1yzLLavS4i3b8FJuKAfJV+eJn7/9zq9/feGnP36b+OXPLxyTM0JUdH1P23XM5rXN08XGkw6OtNiKLVvl4VwdXOFiGZ+ilxzyd+YfKxbnDcvLdtJVaCNrhTEdw+2GMYbZa2Ox1jZWavEavTHP1iyFyzz3WOkA7/5OkAScgxNd0/OjyouC2YvasKhsltcdz4nFm/BZiz0beWR9DVhWLqFKkKLiNt4Y7yO38ZPH7O73+8Sjsiz7NFwqB0d5uP2B3e0ddzjh9scJu9+TtiWNbmjb9ocJJ8Pnaj0l3JYWz4dvvCWvbMoNb1XAuvJYSJtQpaRJRhhFKKWRVYWQEiErhJATj6Xkef5pOH8swuxZSxtLu9iNP6XzhhPOcORcxfi7Pa63Y+cHeDsfx9vhB3tsxyUI9jTGfBouapuVdPG1T2AOeI2Poz287ojXn3CH4zTD8HwhiiKiKCSO44miKKhrTdua70+OZc6puEzNLM8orgWVrqg7Q9236M6gTYuoGlTT0d+gG+7/M4xMZw+yvGT2z0XyGmXs4hwnyggywYdqOUoz6aXpiGVLnJQobRgelwcm7foRXXco3dKYnkJ2zP5VLsurixWtWGcrVsmGl8xlIR9fZo/VHTnpjFRU5FpT1DWF1pR1Ta4UiZAkUpJKyVUZ/gMebco7C/T51QAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Copilot chat on GitHub&quot;
        title=&quot;Copilot chat on GitHub&quot;
        src=&quot;/static/db3fbc75a218a4ffdae5bec8be5a8da8/024d6/copilot-gitub-chat.png&quot;
        srcset=&quot;/static/db3fbc75a218a4ffdae5bec8be5a8da8/5a46d/copilot-gitub-chat.png 300w,
/static/db3fbc75a218a4ffdae5bec8be5a8da8/0a47e/copilot-gitub-chat.png 600w,
/static/db3fbc75a218a4ffdae5bec8be5a8da8/024d6/copilot-gitub-chat.png 961w&quot;
        sizes=&quot;(max-width: 961px) 100vw, 961px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;br/&gt;
&lt;h2&gt;Generating a PR Summary from Multiple Files&lt;/h2&gt;
&lt;p&gt;Another way to trigger GitHub Copilot is through the menu located above all the file
changes, as shown in the screenshot below. This option allows you to select multiple
files from the change set and start a chat with Copilot about them.&lt;/p&gt;
&lt;p&gt;One practical use case is to have AI automatically summarize the
pull request for us. While there are already
&lt;a href=&quot;https://www.awesomecodereviews.com/tools/best-code-review-tools/#other-tools&quot;&gt;tools and plugins available that offer automatic PR summarization&lt;/a&gt;, GitHub now provides this functionality out of the box.&lt;/p&gt;
&lt;p&gt;To try it out, I selected all source code files changed in this PR, along with
relevant configuration files. I omitted content-related files such as markdown
files, as well as certain configuration or generated files like &lt;code class=&quot;language-text&quot;&gt;package.json&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code class=&quot;language-text&quot;&gt;auth.js&lt;/code&gt; file is part of a rather large PR, as shown below. I ended up
adding 14 source code files the &lt;em&gt;context&lt;/em&gt; of Copilot.&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 475px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/5ea8cec4ea371351c587a14399261d7d/466da/pr-summary.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 126%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAZCAYAAAAxFw7TAAAACXBIWXMAAAsTAAALEwEAmpwYAAAD3klEQVQ4y5VVW4/cNBSevwwSpagUCi0qoH3lGfHCE2hLCzyCkCoe4KXSsuzOTC7OzXGcxIlzm0xuH/KZ3WmXLWqx9OXYx/Fnn+MvJ6tpmrDrexSlRpYrQq4KGP+yLJjn+WixAGmt4GQeZJ1hHCeM04T9fiCYNSvzoiFsuw513aBpWjRth/9q3bRDVAnooT76zIbjOB4Ijy92HZRSyHOFNE0hkgRSpog4B+cxIY4F+WpdIxESWZ7TvK4q4miaBivXtfH1Vyc4OzvDL7/+hufPf0cQhERgrO048HwfLmNk/SCkzRjzkBjreVCqIMKqqrDKpMDpt98giiLYLkMYmR1rTNOM/9uI8HowjCP6/Z5yWWqNtm0xTyOGfY99vyM7DnsMw2E8Grvvyb/b7SiPdV1jZR5/nZ9TaJZtw7JsbLcWWMAR8AwsELjYMKztAI4XY+OEuLQ8WIxj4wRwAwHP8yl/lMO+7ynZQiSUN5lmkFIiVj0cMSBIR7jJCFsMcJOBfH42YssHeHKEn45YlldCvh7cbstbwGhzxkRavSK8Tr7WmsI2N+u4Lt3i1rJhO4e+yzyaY54Px3ERhhEcl8H3A9IgcRhCI+x5OWDBgijitNhyHKw3W7JmvLEsOIwRiZGKkZHJ/7WwjyGb4762zUCRaxSqgi5rNFWHQmnyvVE2l8LCu99/jHtPH+PO6cMr+ynuPXuMuz88InvnyUM8+PkE751+gj/dF6h1B55IiCRFVbc3CS/iLd757j7uP/uCyD768Uu8f/oQHzz5DHefPMKHTz+n/oOfTmjjP9wXULlGEHGEPEap65eEplq8Vbu6VOrOwLwsx7s2FzvNy4HQTORFCZFIRDxGIiUhzTLwOKZPMVfqZnpNdZmmY/kymOcFWpMOF/T9HqoocH6xxnprw3IYwXY9xCIhK2RKiERCtXN5jYBv6LDtdrBcHyEXcP0IfhSjrGoCCyLYzIcXcsREKqFKTQe5LZsrwqpucLGxabEfxkSY5gpeEGFjM4RxAi4kpcdsbLke0rw4EpqQh2E0IR8ITdV2vYDCMhVbZjmFbU6cpBm63Y6s5TJEcYI0y1Hq6kbVnucJq7IZIfIePG0QJDUCUcGPNeKsQygbMF7S2BcaHi/hxRqRbJCoHUTeIU5bxFmLvBqRFANWqp5gOT4uL9e4XG9h2S42Gwt/X6yxtRxwLq4qUAoe+WDMQhT58DwbjNnwfRecByQgWYzmhDOkTBDzQ0kvioL+LaakXX+rb9syPWJVGMJc06+zbtrbejYCfgNMPSjLEkINWOl2giwGmNBVNVIuXoWqDv6D/Tdezud6oBP+A0hOXArp+8CzAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Selecting multiple files&quot;
        title=&quot;Selecting multiple files&quot;
        src=&quot;/static/5ea8cec4ea371351c587a14399261d7d/466da/pr-summary.png&quot;
        srcset=&quot;/static/5ea8cec4ea371351c587a14399261d7d/5a46d/pr-summary.png 300w,
/static/5ea8cec4ea371351c587a14399261d7d/466da/pr-summary.png 475w&quot;
        sizes=&quot;(max-width: 475px) 100vw, 475px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;For the sheer amount of code changes, Copilot’s automated code review summary
is surprisingly short and lacks meaningful insights. It primarily lists some of
source code files included in the change set, grouping them together logically.&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 465px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/6779ec947c263b06b06a2d7b642ec389/9ff85/pr-summary-2.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 94.33333333333334%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAATCAYAAACQjC21AAAACXBIWXMAAAsTAAALEwEAmpwYAAACmElEQVQ4y6VU2ZKbQBDz/39cklobm/s+fHFjg69VSmLt1CaVl12qmpmBQd1Si1mM04Sm7dC2LcqqAtfX2w14f8f7F2JxOo+o6gZ5XiCMYnT9gOlywVevxfl8RlEUKIottrsd0jRDnCRIkhRpliMII8RxgjCMcDweEcUJojjW/jCKkGW53ruuh9PpjAWpep6vTb4faNNz7rgegiBUbEwLcZLCcVztJ5CxXmO73Ynq5XKZKdd1Dcuy9THBmI0fcM4qCR5FcyhhGClBXhR67weh9t/vj5ny6XQSDQJ/52J1AuSEOjIbs+52e2m4PxxQ1bW0KstS+h4Ox1do736v99N0eYEuOOn7HsuVgdXKEHXP9zUybMdRYxi268H1fGwsG7mAJgzD8LnLRO2H4QMoQJZl0ohis1IGXZCkmUCpmVyQZmJBqTiySfTwR4WDuuh4vmJtWjBtRx9tTBuuH2AYThjHUfJcr1dVRoewB23XSRY+f2nIrtLYbBBHepA2YVVc84OmbXEsK+z2B2x3e3R9j8PxqEQvyrx1XY+VsRYdBk2aZhmaplH11FjBqrpOzSrLSoBt26myV1N4YwZVQo38QKC240qfqqpFj4AEYnLS55rPSZng1YftBMgspmWry6z0x89fWC5XCsNYS1/TtOQE/im27eBtudJzY71RAU3T/rHN/X6XD5M01ZwU+Ctx5Jr24PoZ9N0cE7qu055PlFl6EIaiy1OHpiVVZuWBoHnbqquck17dNKjr5t/T5tllWuVtZcDYmLN5TVuxNNayEjvNZlES0rRsG5uNqeTFdj6pHo/HTPl2u8l3luMiiGL9UmySF0TI8kJWYhIan0D89UiXhbBBz+a8NCSyTDuOGMdJ2jEJD9q/NWVw//8O2N+abpsO+GIKnQAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Automated PR summary&quot;
        title=&quot;Automated PR summary&quot;
        src=&quot;/static/6779ec947c263b06b06a2d7b642ec389/9ff85/pr-summary-2.png&quot;
        srcset=&quot;/static/6779ec947c263b06b06a2d7b642ec389/5a46d/pr-summary-2.png 300w,
/static/6779ec947c263b06b06a2d7b642ec389/9ff85/pr-summary-2.png 465w&quot;
        sizes=&quot;(max-width: 465px) 100vw, 465px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;I also asked Copilot to indicate where I should focus my attention during the
code review. While it provided an answer, I found it underwhelming. The response
listed a few files but offered no explanation for why these files were highlighted.
Additionally, the &lt;code class=&quot;language-text&quot;&gt;auth.js&lt;/code&gt; file—one that I, as a human reviewer, consider highly
relevant—was notably absent from the list.&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 460px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/5f86e74fbca7405235b11fc11202ddc9/08a84/areas-to-review.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 55.333333333333336%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAABt0lEQVQoz51S2W7jMAzM/39ct+02bez4tmTHlnzb9alMQSbxdvdlgQogRFHEaDijQ1lXePr1DMuyYdlnPL+84u3tCMdx8fL6m8/H4zv+t67XK++HaZnRNi3atkXbdajrGlVV8bnivIZSGtM03WPGsiwclFPtAUb7YTUbF30/gH12EAuJPFeQMoHWBaIoZrZhGHGP5/mQScL31E9BwH8BbtsG1/V4RAIzxmBd1z2IDfVQPs8z54/a93EZcNlW9P3ADOjVOBa4XC5I0hSO6yFJUriehyzLmd3x/YN7Se8oFjvQruGyLRiGAWEU4+NkMSCNZtk2m3OyLDbldDeNQOkxISSCIEQYRTc5goBZ88g0CmlHQazKsoIxV2wbjX6T5N/4LgkF1e4arhg/eySJQJpKSBFDiAhR6EOrHGHoI00khEzYoFgIaK13s8iUs+Mwc9L+MEwrVGNQ9QZlZ1B0BmVvoNvbOW8MdD2h7zt0XcdfqigK/k5N06IoSozj+MeUblwQZhPifESYjQiyCVIv8C8zBO3ZDKk+0TQNg+RK8Xe6gVZQWvNDO+A4j9BKoapK5HmOdZ3xk/Vw+QsW1UQ3llc11wAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Asking Copilot for areas to review&quot;
        title=&quot;Asking Copilot for areas to review&quot;
        src=&quot;/static/5f86e74fbca7405235b11fc11202ddc9/08a84/areas-to-review.png&quot;
        srcset=&quot;/static/5f86e74fbca7405235b11fc11202ddc9/5a46d/areas-to-review.png 300w,
/static/5f86e74fbca7405235b11fc11202ddc9/08a84/areas-to-review.png 460w&quot;
        sizes=&quot;(max-width: 460px) 100vw, 460px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;I am disappointed with both responses. Perhaps my prompt wasn’t clear or specific enough.
To address this, I tried again with the prompt: &lt;em&gt;“Summarize the PR in more detail.”&lt;/em&gt;
Copilot processed the request but returned the same short and
unhelpful summary as before. Bummer.&lt;/p&gt;
&lt;p&gt;Next, I sent another prompt focused on risk assessment:
&lt;em&gt;“What are the most risky changes in this PR?”&lt;/em&gt; Once again, Copilot took its time
to &lt;em&gt;create the plan&lt;/em&gt;, but the answer was almost identical to
the previous response. Unfortunately, it offered little insight into the PR,
and the risk assessment did not seem appropriate or actionable.&lt;/p&gt;
&lt;h2&gt;Don’t use AI for Risk Assessment&lt;/h2&gt;
&lt;p&gt;A chat interface is a powerful tool, letting you ask any question
or provide any instruction you want to the LLM.
While this flexibility is valuable, it doesn’t prevent us from making unwise
requests. For example, asking an automated code reviewer to assess
the risk of a pull request is one such misstep.&lt;/p&gt;
&lt;p&gt;LLMs are fundamentally unsuited for assessing risk in source code.
They lack the deep understanding of domain-specific logic, semantic nuances,
and file interdependencies required for accurate analysis. Risk often arises from
how files interact or their role within the system. These are all factors LLMs
are incapable of dynamically evaluating.&lt;/p&gt;
&lt;p&gt;LLMs treat all input equally, making it hard for them to prioritize files
based on critical factors like functionality, or security and business relevance.
Without domain-specific knowledge or explicit input, LLMs cannot evaluate the
importance or business-critical nature of a file.&lt;/p&gt;
&lt;p&gt;As these models often respond regardless of their suitability for the
task, it is crucial to
critically evaluate whether this type of AI is appropriate for the specific
task at hand.&lt;/p&gt;
&lt;h2&gt;Asking Copilot for Code Improvements&lt;/h2&gt;
&lt;p&gt;The experience of interacting with Copilot on files may feel smoother when focusing
on a single file. For instance, let’s choose only &lt;code class=&quot;language-text&quot;&gt;auth.js&lt;/code&gt;. Once selected,
the chat window opens, and Copilot is ready to assist by responding to your questions
or following your instructions.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 934px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/b01f3089fb7b4128d1e1cc13ac5c5f62/078fe/copilot-on-github.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 57.666666666666664%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAACNElEQVQoz32Sy27TQBRA8/97FrBBQrDkD1jwSHikTQqNXROnbRJiZ2xn/Io9tscT56A4CAqVuNLRndW5j7mDslQUpUK3LfuioCiKPjdac4q2NTSNpjUG3Z45HDrM4dDnxrSs5YYf4h57NWNQVYpWaw6HAw+j6zq0bsmyHBnHfVFvG7LZhmT7AhknSJkgZMiryWuefXrJk+FzBiKucYTPVqZsw5RtdEYmOdFuR5wkvfRU4Hg8cuw66qZFZhVBXBDnFTJVpHlDURkG7wPJ5W6HnYRYcYSdRHwvUoKyQClFVTfncXXbj8kRZK1YqJy7as9tlbNQGbcq79+DK21zmVl8iuYMhc1775o3qymLnUeWZmw8D8/z8XyfJE0x2hA1MU57h2tWzM3yLwbT2mGS3TASC4a+xci3eOdds0oDmqqmVKrvVFUVpSrRdUPUJDjtEtescdu/GVw1DtPc4WOwYCxdrotbrvYufhmRZ3uCMCQMI4QQiCBAlYqd/o9wWt1wmdiMggWT1OVzeMNQWCxTwf6X8PQ5VVX1nXameyw0fxhclhZf5IyRcHm3sRjvHMbxDZYQeH7Cer0mCCOMMb9PSqjdA+HqsXAcz/iwnTPa2lxlLtN8TlBJdKP7Iz9x2uXxeBZ6e4HT3veC+SOhsphkNm89l0l6x6y84yJxEEr+ufIjmPrAxfIrT4cvsKXLbbc5y/4d+aK0uIhnWOr+QbUVS+3h1yFeHfSsiy1WsmAcfON7+aC7f4Q/Ad1EfmZ9RKbnAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Copilot on GitHub with multi-file selection&quot;
        title=&quot;Copilot on GitHub with multi-file selection&quot;
        src=&quot;/static/b01f3089fb7b4128d1e1cc13ac5c5f62/078fe/copilot-on-github.png&quot;
        srcset=&quot;/static/b01f3089fb7b4128d1e1cc13ac5c5f62/5a46d/copilot-on-github.png 300w,
/static/b01f3089fb7b4128d1e1cc13ac5c5f62/0a47e/copilot-on-github.png 600w,
/static/b01f3089fb7b4128d1e1cc13ac5c5f62/078fe/copilot-on-github.png 934w&quot;
        sizes=&quot;(max-width: 934px) 100vw, 934px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;Let’s ask Copilot: “How can this code be improved?” and review its response.&lt;/p&gt;
&lt;p&gt;When you prompt Copilot, the page reloads. If you were examining a specific change
in the long list of PR changes, you’ll find yourself back at the beginning of
the list. This behavior can be frustrating and unhelpful, as it causes you
to lose the context of the code you just reviewed and sought assistance for.&lt;/p&gt;
&lt;p&gt;Another negative UX aspect is that the chat window is small,
requiring significant scrolling to read Copilot’s full response. Unlike the
IDE experience, there is no option to open the conversation in a
larger, more convenient window.&lt;/p&gt;
&lt;p&gt;Copilot’s response is detailed and starts with a list of
improvement suggestions, including enhancements for error handling,
type safety, and dependency management.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1093px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/60fd06e8e494ff4b62382611aaa3b06b/d3f96/chat-on-github.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 58.00000000000001%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAACVUlEQVQoz02SC6+aMBiG/f+/a1my7Uw9chOcCIrclEtLuQjos1B3kpU8KW3St32/7119RgnH7EaUVVyyilx0iH6m7hYmqvbN8q/6Edn2b1RP0w1UjSIvauqmpWoerH7WKXYesos9NpnPNg/5yAJ+5wHr25m9jLFEzEFkZFnGvSi4F6VGqIairZmfT6Z5ZpwmVuvOwCxN9pWFVe0waotNfWBTuBjKw5tO7CefYxdyDgKqqqbtOsZx5Gu8Xi89P59PVuvWwSptnLvB5+2TbWlh5iamOOBNIYf5jDuFBI+YRimEkAgpkbJhnmdey/daQK9XvxuTXXNgfduzLl1M6eNIH6s5YnU+RnPAbA9acLFZlCVd3+vDy4sWu0/N6z9B4WIID6c/aewuwG597N7H7o7Yg89piKhrwTA86LqOvu8ZhkGLy0ah2vYt+CENTOmySzds8w2OdDDUEbP9gyHfl7hTQDgm2vL1GnONY263O2mW6Zr2/cDj8dAXrH6JHZ/Kw1KLXRunddk/3iJfOJPPeUpoGkUQhlyiqxaN45i6rlFK0XU9UkpWW7nHKlx8dcJrjjjCxesDvMcZb3jjDiHnR6oPXKKINM1IkpQkfRNFV4QQujkrN845pXcu15IorSjEEtaRspko9TxSyhG5hLyqCcMz0fXK5RJpy4u4FpTyLfg9zzCzK1YSYucRXnXHqQv+qIpgkJwGybEXxIPSNVwsLqn76u6/CGqxdw57GyvbYkU/sJIPfiYG3xKTHzeLnTpgdkddw3CKadtON2AZ8/zSUVm6vOwvjOPEX7ZyhBYpExn9AAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Copilot Chat on GitHub&quot;
        title=&quot;Copilot Chat on GitHub&quot;
        src=&quot;/static/60fd06e8e494ff4b62382611aaa3b06b/d3f96/chat-on-github.png&quot;
        srcset=&quot;/static/60fd06e8e494ff4b62382611aaa3b06b/5a46d/chat-on-github.png 300w,
/static/60fd06e8e494ff4b62382611aaa3b06b/0a47e/chat-on-github.png 600w,
/static/60fd06e8e494ff4b62382611aaa3b06b/d3f96/chat-on-github.png 1093w&quot;
        sizes=&quot;(max-width: 1093px) 100vw, 1093px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;When we scroll down, our personal automated code reviewer, Copilot, provides an
updated version of the code that you can copy and paste.&lt;br&gt;
However, during a code review, the ability to copy and paste the
entire updated code is not particularly useful.&lt;/p&gt;
&lt;p&gt;What’s more important is mapping the new code back to the code under
review, identifying the specific lines that were changed,
and determining where to leave comments.&lt;br&gt;
Since the piece of code under review is relatively small, it’s manageable
to map the updated code in the chat window to the corresponding lines
in the diff view.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1096px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/68821353a3813ab4c520bec8b3246ee9/8ae78/updated-code-github-copilot.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 59.333333333333336%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAACZklEQVQoz02S646jOBgF8/7PterVjLKdpLmTkHQmhASMsQ2Ya9S1gt7VjKXS+Vf6jnU2ycPi3HKuRc31WZOKFmEmZPOiXKhnxP/onkJZCtWtKXRHoS13YchEQ6kHNm/iyY8yxX+c2WUnDvmVg0j5kHf2IsXTD451jl/nqK5FVYpSSoQoqbRC1JK2a5mmiXme2ez7kF3rEJYOXuXgyD3vlcdWhPxT+nj9kWhM8IcTollEkqZpGIZhpes6rLWr8Ovri83Oxrw3PpEKcMsPDtJhX0Xs5ZFw/OT4+sXxdSOcrxirqbKcpyiRouKeS/JSI6TGNC39MP4nrF0cfWRbBBzMEbe+rHg2wesSnCbGH8+YVmPuOWmakd2fXNKc9FGswsb2DOP0LdwaB9fEuHVM0J/xu0X2W+h3CcF4wfQNuqh4FiWFVBRlRS4qbD8yTK8/hS6+iXi/b/GUi9fEODbBbY+47Yl4uhJOF8zYUj5LfqXZKn0WS2W1XljpmnGa2bzbiJ/qgDckuE2AbyPC4UT8+vzN/EkwnTGTRVWGR16Q3TOyZ0FlWgpp1pzmFxu3ubCTIVF15mg+CdSJQJ+JupTYpsTdN6G9oQeLkYa66VaBMu1at+1HumGmblo2WTUQPQTZMs5cr4Ot7UzdvzD2hbbzmqqd6MeZvFBc0pK8spTaouoOaTpM29O0ls0PmfNW3PDuCfs0wituHMoHjnoSd5LzpDgNFXEv0b1FVpra9rTdxDDOzPNr/buFea08fQ87uG9xsr9x8x1vjw/+yj74Wfrs6ohgTAjnBDM29N3A8pYRLyyD7vtl5CPjNPEvPjKAT1f78IEAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Updated version of the code&quot;
        title=&quot;Updated version of the code&quot;
        src=&quot;/static/68821353a3813ab4c520bec8b3246ee9/8ae78/updated-code-github-copilot.png&quot;
        srcset=&quot;/static/68821353a3813ab4c520bec8b3246ee9/5a46d/updated-code-github-copilot.png 300w,
/static/68821353a3813ab4c520bec8b3246ee9/0a47e/updated-code-github-copilot.png 600w,
/static/68821353a3813ab4c520bec8b3246ee9/8ae78/updated-code-github-copilot.png 1096w&quot;
        sizes=&quot;(max-width: 1096px) 100vw, 1096px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;If you find Copilot’s suggestion useful, you can add a comment or make
a concrete code change suggestion directly in the PR.&lt;br&gt;
However, for non-trivial changes, I personally feel uneasy making
edits this way.&lt;/p&gt;
&lt;p&gt;For anything beyond a simple adjustment, I prefer to make the changes
within the IDE, where I can immediately verify if I’ve made a
mistake (maybe even just a typo, or copy/paste error).&lt;br&gt;
This ensures a smoother and more reliable workflow, particularly for complex updates.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1107px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/eeacee3775defcae482d8dc9bca94606/d7ba6/comment-based-on-copilot.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 58.333333333333336%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAACYUlEQVQoz0WTW4+rNhRG+f//qg+VKs10LplcJ2eSEEjAgME2YGxDsqqQ9tTSkuWXz957L0f7vCEua4TsyGVL03o6d6dzt5l2+I+Jzjr6wc90j90FVNdT6xbdWcbpRvRHkfAhTnxe9rzlB96LMx9V8kSmbHXGUmUcuxqlNJkQiKJEiJKikRRK0tsBH0a8D0Rvw4K1WrKVS5byk4Vc8Lfc8SLWfOgN3+OBdfjFyaVI2VBWFXYYcM4xDAPW2hnud7z3RC/tiqXesqlXLOovFmbHu9yy6g98TzH76cx2PHEOOU7q+XW1bMgLiagUVa1pdEvbW4bBEb22S1bdns9iy3u1YWV+WJkj6+7A1h3Z2B/W7odkFNhKkV/FzCWrOGcVeVmjTI91gcE5okzVXOoaoQ1CtTNpqbiUDUklScqKpKqo2hbbGMq8ICsqStlwzQuqRj/D/PhvYC5Jz1fSJCMXFSIrydKMIivx/sY4QQh3fLhhTEscpyTXHFFKRFkjVUutDL11c1+j5FpwveYcT8ncD2U6dNtjOosPE+N0JzwYb/M0H+Wm6ZU4PnPJKwqpuRY1bT88h1KWDY0y1LVB6R6te4yxKN0xuJEQbjg34fyE0S1GGawP84UPH60b55JdGFFaE3XTQN07PB53/59AoO41hZakVTb7Zq3n51wS55pc9kj9kNoiVT+HG2OI/mq+eCl37Lo9uxDzHWJ2Pp4nvPOn53k8kQRB2/bIR7+GMBPG6Sn0b8Ij8INlv+ctfeX19CcL8can+cVXt5+dXNsDm3CcPewf32sceaz7/c7tdpvde4ru55/yD01/ikvoW9sqAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Commenting based on Co-Pilot Suggestions&quot;
        title=&quot;Commenting based on Co-Pilot Suggestions&quot;
        src=&quot;/static/eeacee3775defcae482d8dc9bca94606/d7ba6/comment-based-on-copilot.png&quot;
        srcset=&quot;/static/eeacee3775defcae482d8dc9bca94606/5a46d/comment-based-on-copilot.png 300w,
/static/eeacee3775defcae482d8dc9bca94606/0a47e/comment-based-on-copilot.png 600w,
/static/eeacee3775defcae482d8dc9bca94606/d7ba6/comment-based-on-copilot.png 1107w&quot;
        sizes=&quot;(max-width: 1107px) 100vw, 1107px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;br/&gt;
&lt;h2 id=&quot;review-workflows&quot;&gt;Should We Ask AI to Review a PR?&lt;/h2&gt;
&lt;p&gt;The idea of a peer reviewing code already submitted as a PR by
prompting an LLM to improve it feels rather strange.&lt;br&gt;
Ideally, the process of prompting AI to refine code should be driven by
the developer who wrote the code and should occur in the IDE before the
PR is submitted for peer review.
This use case, or a self-review is nicely covered by Copilot in the IDE.&lt;/p&gt;
&lt;p&gt;On the other hand, using AI to &lt;em&gt;explain&lt;/em&gt; code during a PR review
is a valuable and practical use case.&lt;br&gt;
Similarly, if a reviewer has a suspicion or an improvement suggestion,
interacting with the LLM can help clarify their thoughts.&lt;/p&gt;
&lt;p&gt;In such scenarios, it’s unlikely that the reviewer would use
a prompt as general as the one in this example.&lt;br&gt;
More specific prompts tend to yield better results.
A &lt;a href=&quot;https://www.awesomecodereviews.com/checklists/code-review-checklist/&quot;&gt;code review checklist&lt;/a&gt;
can provide inspiration for crafting effective code review prompts.&lt;/p&gt;
&lt;p&gt;In most cases, reviewers will have a concrete question or suspicion
about the code and will ask the AI code reviewer for targeted feedback directly.&lt;/p&gt;
&lt;h2&gt;AI Helps Reviewers Verify Their Suggestions&lt;/h2&gt;
&lt;p&gt;One of the most significant benefits AI offers to code reviewers
is helping them build a mental model of the changes by explaining
the code and providing feedback on their suggestions.&lt;/p&gt;
&lt;p&gt;For example, let’s imagine we’re reviewing the code and
notice:&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;const [user, setUser] = useState()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;We think it might be better to change this
to:&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;const [user, setUser] = useState(null)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Yet, feel uncertain and insecure about making the suggestion. What if we are wrong? Insecurity during
&lt;a href=&quot;https://developer-success-lab.gitbook.io/code-review-anxiety-workbook-1&quot;&gt;code reviews, and even anxiety&lt;/a&gt;,
is a common challenge. This is where AI can help us investigate our idea.&lt;/p&gt;
&lt;p&gt;Let’s ask Copilot if our suggestion makes sense and why.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 465px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/10a35d56b70e01495193800de96a1747/9ff85/evaluate-suggestion.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 107.66666666666667%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAWCAYAAADAQbwGAAAACXBIWXMAAAsTAAALEwEAmpwYAAADHklEQVQ4y51VyY7aUBDk/38pl0iJlEsuyQAD3le8L4AN3mYqqmLRKKdMLD3xbLf7VVVXN6umPaIsK4RhBD8IcUgSpFmGIAiRphni+IAsyzEMI+Jjhm1qIu8qTNOMeZ6xLIvWMI76XV2HCf11QFXVSpzlOfKiUKI8L1AUJfKixLnrUPUt4iZF0x+fCedl0f5yvd4Sfv/6BT9/fEOcZHAcF+dzh8t1wP9c7+/vWLmmAdcy0bQt6rpG13W43k97UBKS+3p7e9PvNE1PuvO8PJOu+ssFu70J1/Xg+wH2himktu3AtGzYjoMwirDbG9pT39fdHrvdXnHU3rIdAVHCsiwRHw5I01QvqR+fBWGoe2rJ+8MhUZGoMQ/gPopiacyYqq5vCf9Jm3/UkHKsqrpBmhewLBuO64E2GsfpU8VgIi4Vpet79P0FTdOiaRppcblcMI4jhmFQgcZpwnUYdM81zTP6vteeBfp4rei/IIzg+QE8z0eSpBKZJjdMS3vH9bEzTLh+AMfzYdou1tsdDNsROwI4n89YSPmQpPj1stEHYRQrkR9GKKsacZKiblowJooPkqO4A0izHEmaoSgr2S1JU1lpdTqdUJSl6LJTWOW/aXzmUpWPx5Mos49pIcd1tdjDWZYhiuP7PpddUiErxYIMaDnGUO8VK0Of/X5ZY783ZGaae7t91YCg5wzDlJ4yOjV1XDXBZvsqmdabLTzfv9mGCLuul3FZFCIkEiZj9zySup4va/GZaVqgOx7tSEcQmCgzK/UzTFOnEo1l20JBROyCJLl1CYvAw/wgeE4isqP2bEkmF0JWiYl4OuGTsmndKD70tB1XFiJSxkkeymBaols3zc3YTEiTMoio2MPcUysi+DhdSO0xZcb7QH3cP6vMG5qb0+NlvVFS0bZs0SJV6ktZVOk811AgTeqd57kqzjh2mRAymCPp1h2mKHPSkCYPehSCNNnvfM7FxCzk9nUnIJrYTHg6n+V++pABDCQ62/VkdOrGgvAddXW92+xUjONoDsx32krYti3W642o0lvUjx/zA14cBhR8Wd6eU5raPqb5x7+AP+wufVxe/it9AAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Evaluating review suggestions using AI&quot;
        title=&quot;Evaluating review suggestions using AI&quot;
        src=&quot;/static/10a35d56b70e01495193800de96a1747/9ff85/evaluate-suggestion.png&quot;
        srcset=&quot;/static/10a35d56b70e01495193800de96a1747/5a46d/evaluate-suggestion.png 300w,
/static/10a35d56b70e01495193800de96a1747/9ff85/evaluate-suggestion.png 465w&quot;
        sizes=&quot;(max-width: 465px) 100vw, 465px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;Copilot provides a detailed explanation with three reasons why
initializing &lt;code class=&quot;language-text&quot;&gt;useState()&lt;/code&gt; with &lt;code class=&quot;language-text&quot;&gt;null&lt;/code&gt; is a better approach. We can take
it a step further and ask our AI code review helper to summarize this
explanation, making it easier to use as a concise review comment.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 459px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/ca53b17644d08b19a097a885a5e9e90f/48711/review-comment-summary.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 75.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB+ElEQVQ4y5VU2Y6bQBDk/z8qD3nKW6JE8sV9w3LDMBxrXFE19mojRY4zUsvuoamp7qrBcO0LDj+/Q2mNum4wzzPmZZHfZVlwvW643W4vBZdx/PUD375+QZxmsG0HSin0g0LdtKjqBu/XK15dBDVGPaGsaqRphqIokedvSNIUYRShKArJHceF7wcIwwhvRYEgCGWPNQzWsyNhyDaPxxP8IBCGF9NC3/cfLa/rimma/8g/j4T5sq7Ytm0HJM1HwsWZPW3rL/nt3u623WCoUcusirJEluXCZlCjhBrHlwV5hDFqjbbrZYacB/Om7SS6rhf2/6UyVQ3CEMMwiCgEzfMc5Z1xFMdIswxxnIgwZVU9V3ld39GSUdNAqXH/33bS7jSzfYWmbdH1vdhJT9O9rkXbdRgGhaqqMI56Z0gA23FxOJ4QRjEsx8X5YsJxPWEruWnBsh2czibiJIXnBzifL3A9H67rCft+GHbAqqphWbbYhT6jx1hk3kF4mGXbiKIYpmVJ2xJBIHX06edlkPrhcMTpfJEiAiXCwhdAz/OFDT3K5+yEBxCc+xST9STCURhUkgz5IsH4gHmSJPu+78thfJkCaq2h9SQzHhlay5z7fpCZG/O8fNxbtk8fTtO034h5vyEE4f7DGs+WoacZddOh6wdRl27/1wfgmbF/A9h+etbxFepLAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Summarizing Copilot exploration for comment&quot;
        title=&quot;Summarizing Copilot exploration for comment&quot;
        src=&quot;/static/ca53b17644d08b19a097a885a5e9e90f/48711/review-comment-summary.png&quot;
        srcset=&quot;/static/ca53b17644d08b19a097a885a5e9e90f/5a46d/review-comment-summary.png 300w,
/static/ca53b17644d08b19a097a885a5e9e90f/48711/review-comment-summary.png 459w&quot;
        sizes=&quot;(max-width: 459px) 100vw, 459px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;br/&gt;
&lt;h2 id=&quot;trust&quot;&gt;AI Trustworthiness Is a Problem&lt;/h2&gt;
&lt;p&gt;One of the biggest challenges with using LLMs for code reviews is
the trustworthiness of their suggestions. Although it might seem
like AI &lt;em&gt;understands&lt;/em&gt; or is &lt;em&gt;intelligent&lt;/em&gt;, this is not the case.&lt;/p&gt;
&lt;p&gt;The code suggestions provided by Copilot, or any other automated code review tool
that uses LLMs, rely purely on statistical relationships. The LLMs are designed
to predict the next most likely token, resulting in outputs that appear plausible.&lt;br&gt;
However, even though the output may seem correct, it can sometimes be entirely wrong.&lt;/p&gt;
&lt;p&gt;I’ve personally observed AI fabricating API calls that don’t exist, suggesting
catching exceptions from libraries not in use, and don’t get me started on
the suggestions I received for improving CSS code.
Even while working on this tutorial, there were moments
when Copilot generated &lt;a href=&quot;#incorrect-code&quot;&gt;&lt;em&gt;incorrect&lt;/em&gt; or incomplete code, as shown in the appendix&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;While some of the AI-generated code is correct, the potential for errors is
too significant to ignore, especially during a code review. A code review is
not the right place to take chances with unverified suggestions.
This is why it’s critical to thoroughly evaluate any AI-generated
code review feedback before acting on it.&lt;/p&gt;
&lt;h2&gt;Evaluating AI Code Review Suggestions&lt;/h2&gt;
&lt;p&gt;An LLM can be a valuable companion during a code review, especially
when you need it to remind you of best practices or highlight potential
issues in the code. However, it’s crucial that you have the competency
to evaluate the proposed changes critically (and quickly).&lt;/p&gt;
&lt;p&gt;For developers who are less familiar with a framework or programming
language, relying on AI for code reviews can be tempting. Yet, the less
skilled you are at writing or improving the code yourself,
the harder it becomes to assess the validity of the AI’s code review suggestions.&lt;/p&gt;
&lt;p&gt;Research indicates that even
&lt;a href=&quot;https://dl.acm.org/doi/abs/10.1145/3491101.3519665&quot;&gt;experienced developers struggle&lt;/a&gt;
to fully understand, modify, or debug code generated by LLMs.&lt;br&gt;
As a result, evaluating AI-generated code review
suggestions—some of which can be entirely wrong—remains a challenging task.&lt;/p&gt;
&lt;h2&gt;Evaluating Our AI Code Review Suggestion&lt;/h2&gt;
&lt;p&gt;Let’s examine Copilot’s recommendation to modify the line of code where
we call &lt;code class=&quot;language-text&quot;&gt;onAuthStateChanged&lt;/code&gt;. Our automated code reviewer suggested using
a pattern to ensure that any subscriptions or side effects are properly
cleaned up when a component is unmounted or before the effect is re-executed.
However, if we’re not familiar with React or the Firebase API, it can be
difficult to determine whether this pattern is applicable in this context.&lt;/p&gt;
&lt;p&gt;If we refer to the
&lt;a href=&quot;https://firebase.google.com/docs/auth/web/manage-users&quot;&gt;official Firebase documentation&lt;/a&gt;, we notice that the code snippets
provided there do not use this pattern. This omission could also
explain why it’s not present in the existing codebase.&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/b16326cee58d60b12d35132fb59895c5/d8817/firebase-auth-code-snippet.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 51.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAABYlAAAWJQFJUiTwAAABaElEQVQoz42RyW7cQAxE9f8f6IM9iyZaemdvkn18Qbc0kxgIAh8KZINksVg9xFzRoRBiwfmAdQGJCeM82roXWs1JwUrGiEcH16OVQCkbuVZyqQwhVe6qYn1kUZpVW5S2LMpg7EHacuvacMGE3Mlmp1i9+UNYTkIvmetkGKeZx7wwTgvvtzvTqpCU8RJf2+u2nfhk27/Y9k/qtlO27UDdGGLKjLPhchm5XkbmWaFmjdHtTEEtBu8E8ZGcCilmUiwkSaSQSJJJIZNcJMfM0FibZJkc4aJIS8C/zYSrJtwN4UMRbhp/UYTR4N6XHv3Hinube2x9svhO2gmDZKYlMo0rajXM48J0m9APRbKR6CLRSB+I9kDyqb87JFP2/Ti51IoPiUVH2vldcT09af7sp0fP2D37y7cTr09pwyKZ9W7xv2xX4q+K8DjyVn82/w/PviGVikii5vpd3Zk/m3+KIcSEC/JN9r82/5T4N2GP9PtF+6EmAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Firebase Authentication Snippet - Official website&quot;
        title=&quot;Firebase Authentication Snippet - Official website&quot;
        src=&quot;/static/b16326cee58d60b12d35132fb59895c5/c1b63/firebase-auth-code-snippet.png&quot;
        srcset=&quot;/static/b16326cee58d60b12d35132fb59895c5/5a46d/firebase-auth-code-snippet.png 300w,
/static/b16326cee58d60b12d35132fb59895c5/0a47e/firebase-auth-code-snippet.png 600w,
/static/b16326cee58d60b12d35132fb59895c5/c1b63/firebase-auth-code-snippet.png 1200w,
/static/b16326cee58d60b12d35132fb59895c5/d8817/firebase-auth-code-snippet.png 1238w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;/br&gt;
&lt;p&gt;After reviewing the proposed solution, the reviewer might feel even
more uncertain:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is this a valid pattern?&lt;/li&gt;
&lt;li&gt;Should it be applied in our case?&lt;/li&gt;
&lt;li&gt;Why wasn’t it included in the official documentation?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If the reviewer is unsure about the AI-generated suggestion,
there are three possible approaches:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Trust the AI and recommend the change anyway.&lt;/li&gt;
&lt;li&gt;Stay cautious and decide against recommending the change.&lt;/li&gt;
&lt;li&gt;Dig deeper by conducting further research to arrive at a conclusion.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Option one is not recommended, as it assumes AI is infallible. Option
two is a safe choice but may overlook opportunities for improvement.
Option three can lead to valuable learning and potentially improve
the codebase quality, though it requires more time and effort.&lt;/p&gt;
&lt;p&gt;In our case, we chose the third option and found additional documentation
on a &lt;a href=&quot;https://rnfirebase.io/auth/usage&quot;&gt;Firebase-related website&lt;/a&gt;. This
resource indicates that a listener is returned and can,
or should, be used for unmounting.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/71fe1020f20762b0b7c5871629aa776f/fbf76/another-firebase-auth-snippet.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 14.333333333333334%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAADCAYAAACTWi8uAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAjUlEQVQI122O2w6CMBBE+f/fU5SWVksLRfZSPmHMVuOTDydzMptMdkhpQc4ZtW6otYKZoaIQll9aZ5gbRASi45sf7N5awzCOink+4P0E7z1ijChbQVgCpjThHm9wT4eQAq7hAvdwWNcVpZSeRs5Lf6YP7vsLRAxVhYh0tClEBSQEVu5uXfcmOM/zL7bxBiRu3lizmBm4AAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Another (not official) firebase snippet&quot;
        title=&quot;Another (not official) firebase snippet&quot;
        src=&quot;/static/71fe1020f20762b0b7c5871629aa776f/c1b63/another-firebase-auth-snippet.png&quot;
        srcset=&quot;/static/71fe1020f20762b0b7c5871629aa776f/5a46d/another-firebase-auth-snippet.png 300w,
/static/71fe1020f20762b0b7c5871629aa776f/0a47e/another-firebase-auth-snippet.png 600w,
/static/71fe1020f20762b0b7c5871629aa776f/c1b63/another-firebase-auth-snippet.png 1200w,
/static/71fe1020f20762b0b7c5871629aa776f/fbf76/another-firebase-auth-snippet.png 1252w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;Does this evidence provide enough justification to propose the change?&lt;/p&gt;
&lt;p&gt;Or should we involve a human/colleague to review the AI-based code suggestion?&lt;/p&gt;
&lt;p style=&quot;font-size:50px&quot;&gt;&amp;#128540;&lt;/p&gt;
&lt;h2&gt;AI Code Review Belongs in the IDE&lt;/h2&gt;
&lt;p&gt;When an automated code review is conducted in the IDE, the process of
iteratively evaluating AI suggestions becomes a natural part of
the development workflow. AI-assisted code reviews are an excellent
tool for self-review, allowing developers to inspect and improve
their own code before involving others. There’s no need to include a peer
in this semi-automated code review process—unless during an
AI pair programming session.&lt;/p&gt;
&lt;p&gt;In the IDE, developers can thoroughly modify, enhance, and test the
AI code review suggestions. Yet, by the time the code reaches the
code review stage, the developer should have already leveraged AI
to assess and refine their solution.&lt;/p&gt;
&lt;p&gt;Once a code review begins, the stakes for changing the code based on
AI suggestions increase significantly, while the reviewer’s ability
to evaluate the suggestion diminishes.&lt;/p&gt;
&lt;h2&gt;AI Code Reviews Can Be Time-Consuming&lt;/h2&gt;
&lt;p&gt;While Copilot produced straightforward and sensible suggestions for our
code in this tutorial, this is not always the case. Using AI for code
reviews can lead to incorrect suggestions, as discussed before, but also to
many recommendations that are irrelevant or don’t apply in the given context.&lt;/p&gt;
&lt;p&gt;This challenge is similar to the struggle developers face when using
&lt;a href=&quot;https://www.awesomecodereviews.com/automation/automated-code-reviews/&quot;&gt;static analysis tools&lt;/a&gt;
for automated code reviews. These tools often
generate numerous false positives, which means they are reporting
issues that aren’t actual problems.&lt;br&gt;
In contrast, LLMs add another layer of complexity because they
are non-deterministic, meaning they can produce different outputs
for the same input.&lt;/p&gt;
&lt;p&gt;Sifting through irrelevant or inconsistent suggestions is a time-consuming
task, making it essential to critically evaluate the AI’s output
during a code review, but also to question it’s usefulness and efficiency.&lt;/p&gt;
&lt;h2&gt;Conclusion: AI Code Reviews Need Human Supervision&lt;/h2&gt;
&lt;p&gt;Despite advancements in AI, the human element remains irreplaceable
in code reviews. There is no such thing as a fully automated code review yet.&lt;/p&gt;
&lt;p&gt;AI-generated suggestions can sometimes be terribly incorrect,
making code reviews the wrong place to take these risks.&lt;br&gt;
While tools like Copilot are excellent companions in the IDE,
they are still assisting technologies rather than autonomous code reviewers.&lt;/p&gt;
&lt;p&gt;That said, don’t underestimate the power of AI assistance. An AI reviewer
can help developers focus on details, detect errors, improve code quality,
handle repetitive tasks, and help them build a mental model of the code.&lt;/p&gt;
&lt;p&gt;By combining human expertise with AI capabilities, we can create a
balanced approach that leverages the strengths of both.&lt;br&gt;
As AI continues to evolve, its role in code reviews will likely expand,
but the need for human oversight will remain critical for a long time.&lt;/p&gt;
&lt;p&gt;What’s your experience with AI code reviews? Let me know in the &lt;a href=&quot;https://www.linkedin.com/posts/mgreiler_are-ai-assisted-code-reviews-the-future-activity-7265730773549264897-rGzQ&quot;&gt;comment section on LinkedIn&lt;/a&gt;!&lt;/p&gt;
&lt;h2&gt;Appendix: Code Generated by Copilot on GitHub&lt;/h2&gt;
&lt;p&gt;Here’s the complete, improved code snippet that Copilot
suggested during our automated code review session.&lt;/p&gt;
&lt;p&gt;What do you think?&lt;/p&gt;
&lt;h3&gt;AI Improved Code&lt;/h3&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; React&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; createContext&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; useState&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; useEffect &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;react&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; firebase &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;gatsby-plugin-firebase&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; PropTypes &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;prop-types&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; AuthContext &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;createContext&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token function-variable function&quot;&gt;AuthProvider&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; children &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;user&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; setUser&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;useState&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;token function&quot;&gt;useEffect&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; unsubscribe &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; firebase&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;auth&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;onAuthStateChanged&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;setUser&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;user&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Auth state change error:&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; error&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;unsubscribe&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;AuthContext&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Provider value&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; user&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; setUser &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;children&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;AuthContext&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Provider&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

AuthProvider&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;propTypes &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token literal-property property&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; PropTypes&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;node&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;isRequired&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;default&lt;/span&gt; AuthProvider&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Code Explanation from Copilot&lt;/h3&gt;
&lt;p&gt;The code snippet is a React &lt;code class=&quot;language-text&quot;&gt;useEffect&lt;/code&gt; hook that listens for changes in the
authentication state using Firebase. Here’s a step-by-step explanation:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;useEffect Hook:&lt;/strong&gt; This hook runs a piece of code after the component renders. The empty dependency array [] means it runs only once when the component mounts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;firebase.auth().onAuthStateChanged:&lt;/strong&gt; This is a Firebase method that sets up an observer on the Auth object to listen for changes in the user’s sign-in state.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Callback Function:&lt;/strong&gt; The callback function user =&gt; setUser(user) is called whenever the authentication state changes. It updates the state with the current user object.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Cleanup Function:&lt;/strong&gt; The return () =&gt; unsubscribe() part ensures that the observer is unsubscribed when the component unmounts, preventing memory leaks.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;h3 id=&quot;incorrect-code&quot;&gt;Copilot&apos;s Incorrect Code Suggestions&lt;/h3&gt;
&lt;p&gt;Below is an “improved version of the code”, as Copilot calls it.&lt;/p&gt;
&lt;p&gt;Can you spot the issue with the proposed code?&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; useEffect &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;react&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; firebase &lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;firebase/app&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;firebase/auth&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token function-variable function&quot;&gt;useAuth&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;setUser&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token function&quot;&gt;useEffect&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; unsubscribe &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; firebase&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;auth&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;onAuthStateChanged&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
      &lt;span class=&quot;token parameter&quot;&gt;user&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;setUser&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;user&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token parameter&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;Auth state change error:&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; error&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;unsubscribe&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;setUser&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;default&lt;/span&gt; useAuth&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Using Copilot for Automated Code Reviews”: &lt;a href=&quot;https://www.awesomecodereviews.com/automation/copilot-review/&quot;&gt;https://www.awesomecodereviews.com/automation/copilot-review/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2024-11-22T09:59:30+01:00&quot;&gt;November 22, 2024&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Best AI Code Review Tools 2026]]></title><description><![CDATA[Let’s look at the best AI code review tools of 2026.
AI-powered code review tools have emerged as valuable allies to developers. AI code…]]></description><link>https://www.awesomecodereviews.com/tools/ai-code-review-tools/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/tools/ai-code-review-tools/</guid><pubDate>Thu, 09 May 2024 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Let’s look at the best AI code review tools of 2026.
AI-powered code review tools have emerged as valuable allies to developers. AI code reviewers offer
automated assistance to streamline the review process, enhance code quality, and reduce the burden on human reviewers.&lt;/p&gt;
&lt;p&gt;When I first wrote this article in 2024, seven up-and-coming tools felt like a useful overview. In 2026, new AI code reviewers
seem to appear every week. I see this both in my research and in my work with clients. One reason is that AI coding agents produce
more code, making review the next obvious bottleneck. Another is that it has become relatively easy to put a pull-request
integration around a large language model. The difficult part is not producing review comments; it is producing high-signal
comments that understand the codebase, respect team conventions, and do not exhaust developers with false positives.&lt;/p&gt;
&lt;p&gt;This article provides an overview of 15 relevant AI code review tools. It is a snapshot rather than an exhaustive directory,
and the numbering is not a ranking. I also show how to use a general-purpose LLM as a code reviewer, including when
independent or multi-model review passes can help, and examine the pros and cons of using such tools.
Finally, I offer best practices for integrating AI reviews into your development workflow.&lt;/p&gt;
&lt;p&gt;Here is an outline of what you can expect:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#ai-code-review-tools&quot;&gt;15 Best AI Code Review Tools&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#comparison&quot;&gt;Comparison Table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#copilot&quot;&gt;1. GitHub Copilot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#bito&quot;&gt;2. Bito AI Code Review Agent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#coderabbit&quot;&gt;3. CodeRabbit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#qodo&quot;&gt;4. Qodo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#pr-agent&quot;&gt;5. PR-Agent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#wtd&quot;&gt;6. What The Diff&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#bugbot&quot;&gt;7. Cursor Bugbot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#greptile&quot;&gt;8. Greptile&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#graphite&quot;&gt;9. Graphite Agent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#gitlab-duo&quot;&gt;10. GitLab Duo Code Review&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#amazon-q&quot;&gt;11. Amazon Q Developer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#codeant&quot;&gt;12. CodeAnt AI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#sourcery&quot;&gt;13. Sourcery&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#korbit&quot;&gt;14. Korbit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#kodus&quot;&gt;15. Kodus Kody&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#general-purpose-llms&quot;&gt;Using General-Purpose LLMs for Code Review&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#multiple-llm-reviewers&quot;&gt;Should You Use a Different Model—or Several?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#pros-cons&quot;&gt;Pros and Cons of Using AI Code Reviewers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#best-practices&quot;&gt;Best Practices for Using AI Code Reviews&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#summary&quot;&gt;Summary&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;ai-code-review-tools&quot;&gt;15 Best AI Code Review Tools&lt;/h2&gt;
&lt;p&gt;In this article, we are not focusing on &lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;the best code review tools&lt;/a&gt; per se, nor will I highlight the
&lt;a href=&quot;/automation/automated-code-reviews/&quot;&gt;best static and dynamic code review tools&lt;/a&gt;.
Instead, we are in particular looking at tools that use
&lt;a href=&quot;https://en.wikipedia.org/wiki/Large_language_model&quot;&gt;large language models&lt;/a&gt; and agentic workflows
to help developers understand and review code changes.&lt;/p&gt;
&lt;p&gt;I made the selection based on the features the tools offer, their relevance in 2026, and the range of workflows they cover,
not just their popularity. Some are dedicated AI reviewers, some are review features inside a larger developer platform, and
one focuses more narrowly on explaining changes. I have removed inactive products from the main list.&lt;/p&gt;
&lt;h3 id=&quot;comparison&quot;&gt;AI Code Review Tools at a Glance&lt;/h3&gt;
&lt;p&gt;This table is a quick orientation, not a substitute for testing a tool on your own pull requests. Platform support,
deployment options, and product packaging change quickly, so check the linked tool section before making a final choice.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Workflow and platforms&lt;/th&gt;
&lt;th&gt;Deployment&lt;/th&gt;
&lt;th&gt;Best fit&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#copilot&quot;&gt;GitHub Copilot&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GitHub pull requests and IDE&lt;/td&gt;
&lt;td&gt;Hosted&lt;/td&gt;
&lt;td&gt;Teams wanting review built into GitHub&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#bito&quot;&gt;Bito&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GitHub, GitLab, and Bitbucket pull or merge requests&lt;/td&gt;
&lt;td&gt;Hosted&lt;/td&gt;
&lt;td&gt;Combining AI review with static and security signals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#coderabbit&quot;&gt;CodeRabbit&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GitHub, GitLab, Bitbucket, Azure DevOps, IDE, and CLI&lt;/td&gt;
&lt;td&gt;Hosted&lt;/td&gt;
&lt;td&gt;Broad platform coverage and interactive reviews&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#qodo&quot;&gt;Qodo&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GitHub, GitLab, Bitbucket, and Azure DevOps&lt;/td&gt;
&lt;td&gt;Hosted or enterprise deployment&lt;/td&gt;
&lt;td&gt;Multi-agent reviews and organization-wide rules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#pr-agent&quot;&gt;PR-Agent&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Major Git platforms, GitHub Actions, and CLI&lt;/td&gt;
&lt;td&gt;Open source and self-hosted&lt;/td&gt;
&lt;td&gt;Teams wanting model and deployment control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#wtd&quot;&gt;What The Diff&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GitHub and GitLab pull requests&lt;/td&gt;
&lt;td&gt;Hosted&lt;/td&gt;
&lt;td&gt;PR descriptions and stakeholder communication&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#bugbot&quot;&gt;Cursor Bugbot&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GitHub pull requests and Cursor&lt;/td&gt;
&lt;td&gt;Hosted&lt;/td&gt;
&lt;td&gt;Teams already developing with Cursor&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#greptile&quot;&gt;Greptile&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GitHub, GitLab, CLI, and coding-agent handoff&lt;/td&gt;
&lt;td&gt;Hosted or self-hosted&lt;/td&gt;
&lt;td&gt;Repository-wide context and agentic fixes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#graphite&quot;&gt;Graphite Agent&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GitHub and Graphite&lt;/td&gt;
&lt;td&gt;Hosted&lt;/td&gt;
&lt;td&gt;GitHub teams using Graphite’s review workflow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#gitlab-duo&quot;&gt;GitLab Duo&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GitLab merge requests&lt;/td&gt;
&lt;td&gt;GitLab.com or self-managed&lt;/td&gt;
&lt;td&gt;Teams committed to the GitLab platform&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#amazon-q&quot;&gt;Amazon Q Developer&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;IDE, project, and preview GitHub reviews&lt;/td&gt;
&lt;td&gt;Hosted&lt;/td&gt;
&lt;td&gt;AWS-oriented security and quality review&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#codeant&quot;&gt;CodeAnt AI&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GitHub, GitLab, Bitbucket, and Azure DevOps&lt;/td&gt;
&lt;td&gt;Hosted&lt;/td&gt;
&lt;td&gt;AI review combined with quality and security gates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#sourcery&quot;&gt;Sourcery&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GitHub, GitLab, and IDE&lt;/td&gt;
&lt;td&gt;Hosted or self-hosted&lt;/td&gt;
&lt;td&gt;Review guides, diagrams, and custom standards&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#korbit&quot;&gt;Korbit&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Pull-request reviews and team reports&lt;/td&gt;
&lt;td&gt;Hosted&lt;/td&gt;
&lt;td&gt;Interactive feedback and engineering insights&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#kodus&quot;&gt;Kodus Kody&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GitHub, GitLab, Bitbucket, and CLI&lt;/td&gt;
&lt;td&gt;Open source and self-hosted&lt;/td&gt;
&lt;td&gt;Model choice, transparency, and bring-your-own-key&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;So, let’s have a look at each one of them:&lt;/p&gt;
&lt;h3 id=&quot;copilot&quot;&gt;1. GitHub Copilot&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.github.com/en/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review&quot;&gt;GitHub Copilot code review&lt;/a&gt;
has changed substantially since the original 2024 version of this article. Copilot can now review code in an IDE and act as a
reviewer directly inside a GitHub pull request. You can request a review manually or configure automatic reviews for a repository
or organization.&lt;/p&gt;
&lt;p&gt;Copilot leaves comments and suggested changes, but it does not approve a pull request or request changes. Its review therefore
does not satisfy a required human approval or block a merge.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Native Pull Request Reviews&lt;/strong&gt;: Add Copilot as a reviewer on GitHub or trigger it automatically with a ruleset.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Suggested Changes&lt;/strong&gt;: Produces a summary and comments with changes that can be applied from the pull request.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IDE Reviews&lt;/strong&gt;: Reviews selected code or local changes before they become a pull request.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom Instructions&lt;/strong&gt;: Can use repository-specific instructions to better match a team’s standards.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;bito&quot;&gt;2. Bito AI Code Review Agent&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.bito.ai/ai-code-reviews-in-git/overview&quot;&gt;Bito AI Code Review Agent&lt;/a&gt; offers automated, context-aware reviews
for pull and merge requests. It looks for bugs, code smells, and security vulnerabilities, and posts recommendations as
comments in the existing review interface.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AI and Static Analysis&lt;/strong&gt;: Combines LLM-generated feedback with static analysis and open-source vulnerability checks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Detailed Review Comments&lt;/strong&gt;: Explains issues and proposes fixes on the relevant lines.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security Signals&lt;/strong&gt;: Can include high-severity findings from third-party tools such as Snyk.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integration&lt;/strong&gt;: Supports GitHub, GitLab, and Bitbucket, including self-managed GitHub and GitLab.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;coderabbit&quot;&gt;3. CodeRabbit&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.coderabbit.ai/&quot;&gt;CodeRabbit&lt;/a&gt; has grown from a GitHub review bot into a broader code review platform.
It provides context-aware pull-request feedback, severity levels, summaries, and a conversational interface for asking
follow-up questions. Reviews are also available before a pull request through its IDE extensions and command-line tool.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Context-Aware Reviews&lt;/strong&gt;: Uses codebase and linked issue context, not only the changed lines.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interactive Feedback&lt;/strong&gt;: Lets developers discuss findings and request changes in the review.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One-Click Fixes&lt;/strong&gt;: Turns suitable findings into directly applicable suggestions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Broad Integration&lt;/strong&gt;: Supports GitHub, GitLab, Azure DevOps, and Bitbucket, plus IDE and CLI workflows.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;qodo&quot;&gt;4. Qodo&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.qodo.ai/code-review&quot;&gt;CodiumAI is now Qodo&lt;/a&gt;. Its original PR-Agent evolved into a hosted code review platform,
and Qodo 2.0 introduced a multi-agent review architecture in 2026. It uses repository context, pull-request history, and
organization-specific rules to prioritize bugs and rule violations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Multi-Agent Review&lt;/strong&gt;: Specialized agents inspect a pull request from different perspectives.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rule System&lt;/strong&gt;: Applies team standards learned from the codebase, review history, and explicitly defined requirements.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prioritized Findings&lt;/strong&gt;: Focuses on material issues and provides remediation guidance rather than a long list of generic comments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integration&lt;/strong&gt;: Supports GitHub, GitLab, Bitbucket, and Azure DevOps, with deployment options for enterprises.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;pr-agent&quot;&gt;5. PR-Agent&lt;/h3&gt;
&lt;p&gt;The earlier version of this article grouped several small ChatGPT-based GitHub Actions together. A more useful 2026 option is
&lt;a href=&quot;https://github.com/The-PR-Agent/pr-agent&quot;&gt;PR-Agent&lt;/a&gt;, the open-source project that originally came from CodiumAI/Qodo and is
now community maintained. It is separate from Qodo’s hosted product and is a good fit for teams that want to control the model,
deployment, and configuration themselves.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Open Source&lt;/strong&gt;: Apache-2.0 licensed and deployable as a GitHub Action, CLI, webhook, or container.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Review Workflow&lt;/strong&gt;: Offers commands for reviewing, describing, improving, and asking questions about a pull request.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model Choice&lt;/strong&gt;: Can be configured with different commercial or local model providers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Broad Git Support&lt;/strong&gt;: Supports GitHub, GitLab, Bitbucket, Azure DevOps, CodeCommit, Gitea, and local repositories.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;wtd&quot;&gt;6. What The Diff&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://whatthediff.ai/&quot;&gt;What The Diff&lt;/a&gt; remains the narrowest tool in this list. It primarily makes pull requests easier to
understand by writing descriptions and summaries for developers and non-technical stakeholders. It now also offers changelogs,
weekly progress reports, and AI-assisted refactoring of minor issues.&lt;/p&gt;
&lt;p&gt;I would choose it for communication and change documentation, not as the main tool for finding subtle defects.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AI Descriptions&lt;/strong&gt;: Creates plain-language descriptions of pull-request changes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stakeholder Summaries&lt;/strong&gt;: Produces translated notifications, weekly reports, and public changelogs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inline Refactoring&lt;/strong&gt;: Helps address smaller issues during a review.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integration&lt;/strong&gt;: Works with GitHub and GitLab pull-request data.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;bugbot&quot;&gt;7. Cursor Bugbot&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.cursor.com/bugbot&quot;&gt;Cursor Bugbot&lt;/a&gt; brings Cursor into the pull-request workflow. It reviews GitHub pull requests
for bugs, security issues, and code-quality problems, then links findings back to Cursor or Cursor’s web agents for fixing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Automatic or Manual Reviews&lt;/strong&gt;: Runs on pull-request updates or in response to a review command.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Repository Rules&lt;/strong&gt;: Reads &lt;code class=&quot;language-text&quot;&gt;.cursor/BUGBOT.md&lt;/code&gt; files for project- and directory-specific guidance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Connected Fixes&lt;/strong&gt;: Opens findings with their context in Cursor and supports automated fixes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integration&lt;/strong&gt;: Currently centered on GitHub and the Cursor development environment.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;greptile&quot;&gt;8. Greptile&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.greptile.com/docs/introduction&quot;&gt;Greptile&lt;/a&gt; indexes a repository as a graph before reviewing changes. This lets it
reason about dependencies beyond the pull-request diff and is one of the clearest examples of the 2026 move toward
codebase-aware, agentic review.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Repository Graph&lt;/strong&gt;: Uses functions, classes, and dependencies from the wider codebase as review context.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Adaptive Reviews&lt;/strong&gt;: Learns from reactions, replies, previous review comments, and custom rules.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fix with Your Agent&lt;/strong&gt;: Sends a finding and its context to tools such as Claude Code, Codex, Cursor, or Devin.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integration and Deployment&lt;/strong&gt;: Supports GitHub and GitLab, with cloud, self-hosted, and air-gapped options.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;graphite&quot;&gt;9. Graphite Agent&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://graphite.com/docs/ai-reviews&quot;&gt;Graphite Agent&lt;/a&gt; is the AI reviewer inside Graphite’s GitHub-compatible code review
platform. It automatically comments on pull requests, proposes fixes, and focuses on logic bugs, edge cases, security,
and performance issues.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Codebase-Aware Review&lt;/strong&gt;: Uses repository context to evaluate pull-request changes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom Rules and Exclusions&lt;/strong&gt;: Enforces team standards while suppressing known sources of noise.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Review Analytics&lt;/strong&gt;: Tracks findings, accepted suggestions, acceptance rates, and developer feedback.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GitHub Workflow&lt;/strong&gt;: Comments and suggested fixes appear in both Graphite and GitHub.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;gitlab-duo&quot;&gt;10. GitLab Duo Code Review&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.gitlab.com/user/project/merge_requests/duo_in_merge_requests/&quot;&gt;GitLab Duo code review&lt;/a&gt; is the most natural option
for teams already working in GitLab. You assign &lt;code class=&quot;language-text&quot;&gt;@GitLabDuo&lt;/code&gt; as a reviewer. Depending on the plan and group configuration,
GitLab runs either its agentic Code Review Flow or the more diff-focused GitLab Duo Code Review.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Native Merge-Request Review&lt;/strong&gt;: Review feedback stays inside the existing GitLab workflow.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Agentic Option&lt;/strong&gt;: Code Review Flow can inspect repository structure and cross-file dependencies through multi-step reasoning.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom Instructions and Automation&lt;/strong&gt;: Teams can configure guidance and automatic reviews.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Follow-Through&lt;/strong&gt;: GitLab Duo can help resolve review discussions by changing, committing, and pushing code.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;amazon-q&quot;&gt;11. Amazon Q Developer&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/code-reviews.html&quot;&gt;Amazon Q Developer&lt;/a&gt; combines generative AI with
rule-based security and quality detectors. It can review local changes, a file, or an entire project in supported IDEs.
Its &lt;a href=&quot;https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/github-code-reviews.html&quot;&gt;automated reviews inside GitHub&lt;/a&gt;
are also noteworthy, although that integration is still marked as preview.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Broad Security Review&lt;/strong&gt;: Covers SAST findings, secrets, infrastructure as code, dependencies, and code quality.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IDE and Project Reviews&lt;/strong&gt;: Reviews a diff, file, workspace, or repository and can propose in-place fixes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GitHub Pull Requests&lt;/strong&gt;: In preview, automatically reviews new pull requests and posts threaded findings and suggested fixes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Project Rules&lt;/strong&gt;: Reads team standards from Markdown files in &lt;code class=&quot;language-text&quot;&gt;.amazonq/rules&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;codeant&quot;&gt;12. CodeAnt AI&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.codeant.ai/pull_request/howToUse&quot;&gt;CodeAnt AI&lt;/a&gt; combines AI pull-request review with a broader code-quality and
security platform. It reviews changes for bugs, vulnerabilities, quality problems, and architectural concerns, then posts
actionable findings directly on the pull request.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Specialized Review Agents&lt;/strong&gt;: Covers code quality, security, dependencies, secrets, and infrastructure configuration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Quality Gates&lt;/strong&gt;: Can use findings to prevent risky changes from being merged.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interactive Findings&lt;/strong&gt;: Supports re-reviews, questions, validation, and suggested fixes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Broad SCM Support&lt;/strong&gt;: Works across GitHub, GitLab, Bitbucket, and Azure DevOps workflows.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;sourcery&quot;&gt;13. Sourcery&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.sourcery.ai/Code-Review/Code-Reviews-on-Pull-Requests/Overview/&quot;&gt;Sourcery&lt;/a&gt; provides automated reviews in pull
requests and IDEs. In addition to line-level findings, it creates a summary and a review guide with diagrams, which can help
human reviewers understand larger changes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Broad Review Coverage&lt;/strong&gt;: Looks for bug risks, design issues, code quality, performance, and team-standard violations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reviewer Aids&lt;/strong&gt;: Produces change summaries, inline suggestions, review guides, and diagrams.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customizable Feedback&lt;/strong&gt;: Learns from reactions and can enforce a team’s own coding standards.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integration&lt;/strong&gt;: Supports GitHub, GitLab, popular IDEs, and self-hosted enterprise deployments.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;korbit&quot;&gt;14. Korbit&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.korbit.ai/&quot;&gt;Korbit&lt;/a&gt; positions itself as an interactive AI reviewer that gives feedback before the human team
starts its review. It focuses on higher-impact findings, explains why they matter, and can respond to questions inside the
pull-request discussion.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Contextual Reviews&lt;/strong&gt;: Uses project context, team feedback, and custom settings to tune findings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interactive Fixes&lt;/strong&gt;: Answers follow-up questions and can provide replacement code in the pull request.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PR Descriptions and Summaries&lt;/strong&gt;: Generates handoff context in addition to review findings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Team Insights&lt;/strong&gt;: Extends review data into release notes, sprint summaries, and engineering reports.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;kodus&quot;&gt;15. Kodus Kody&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.kodus.io/how_to_use/en/overview&quot;&gt;Kodus Kody&lt;/a&gt; is an open-source, model-agnostic AI code reviewer. It stands out
for teams that want transparency into which files and context the reviewer used and prefer to pay their model provider directly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Open Source and Model Agnostic&lt;/strong&gt;: Supports different AI providers and a bring-your-own-key approach.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Repository-Wide Context&lt;/strong&gt;: Uses semantic analysis and code search across the repository.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Team Rules and Learning&lt;/strong&gt;: Enforces custom standards and adapts to developer feedback.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integration&lt;/strong&gt;: Works directly with GitHub, GitLab, and Bitbucket.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;general-purpose-llms&quot;&gt;Using General-Purpose LLMs for Code Review&lt;/h2&gt;
&lt;p&gt;You do not necessarily need a dedicated AI code review tool. A general-purpose LLM can review a pasted code snippet,
a pull-request diff, or—if it has access to your repository—the complete change and its surrounding code. Many of the
products above package this basic capability with repository access, automatic triggers, persistent rules, inline comments,
and reporting.&lt;/p&gt;
&lt;p&gt;Before pasting proprietary code into a chat interface, confirm that the provider and account are approved for that code,
and check the provider’s retention and model-training policies.&lt;/p&gt;
&lt;p&gt;The simplest possible prompt is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Review this code.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This can be useful for a quick second look, but a more focused prompt usually produces more relevant feedback:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Review this change for security issues. Focus on authentication, authorization, input validation, injection risks,
secrets, sensitive-data exposure, and unsafe dependencies. For every finding, cite the relevant code, explain the
impact, and suggest a fix. Do not invent a finding when the evidence is weak.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You can change the review perspective to match the risk of the change:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Review this frontend change for usability and accessibility. Check keyboard navigation, focus management, semantic
HTML, labels and accessible names, color contrast, error messages, loading states, and screen-reader behavior.
Separate blocking issues from optional improvements.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For a deeper review, give the model the intended behavior rather than only the code:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Review this pull-request diff against the requirements and repository conventions below. Look for functional bugs,
missing edge cases, regressions, security and privacy risks, performance problems, and missing tests. Return only
actionable findings. For each one, include severity, file and line, evidence, impact, and a proposed fix. If you need
context that is not available, ask for it instead of guessing.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Context matters more than a clever reviewer persona. Give the model the requirement or issue, the diff, relevant surrounding
code, repository conventions, and test results when possible. In an &lt;a href=&quot;https://arxiv.org/abs/2505.20206&quot;&gt;evaluation of general-purpose LLMs as code
reviewers&lt;/a&gt;, review performance declined when the models did not receive the problem
description. Even with good context, the researchers concluded that human review remains necessary because LLMs also
produce faulty assessments and fixes.&lt;/p&gt;
&lt;h3 id=&quot;multiple-llm-reviewers&quot;&gt;Should You Use a Different Model—or Several?&lt;/h3&gt;
&lt;p&gt;There is anecdotal evidence from practitioners, and I see this in some client workflows as well, that the model that wrote
the code is not always the best model to review it. A different model may question different assumptions and notice a problem
that the generating model repeats or overlooks. Research on LLMs used as judges has also found
&lt;a href=&quot;https://aclanthology.org/2025.emnlp-main.86/&quot;&gt;self-preference bias&lt;/a&gt;, although that research is broader than code review and
does not prove that a different model will always review code better.&lt;/p&gt;
&lt;p&gt;The more defensible lesson is to seek independent review passes. The 2026
&lt;a href=&quot;https://conf.researchr.org/details/fse-2026/fse-2026-research-papers/78/SWR-Bench-Assessing-LLM-Performance-in-Real-World-Code-Review-Comment-Generation&quot;&gt;SWR-Bench study&lt;/a&gt;
found that aggregating several independent review reports—using different models or multiple runs of the same model—improved
code-review F1 scores by up to 43.67%. The gains came mainly from finding more real issues; false positives remained an
important limitation.&lt;/p&gt;
&lt;p&gt;This explains why some companies run several AI reviewers on the same change, as long as they can afford the model tokens and
the human attention needed to triage the results. I would use this selectively rather than adding several bots to every pull
request:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Let one model or coding agent implement the change.&lt;/li&gt;
&lt;li&gt;Give a different model a read-only review with the requirement, diff, relevant code, and test evidence.&lt;/li&gt;
&lt;li&gt;For higher-risk changes, run separate focused passes for correctness, security and privacy, and—for user-facing
changes—usability and accessibility.&lt;/li&gt;
&lt;li&gt;Deduplicate the findings and require evidence for each one.&lt;/li&gt;
&lt;li&gt;Let a human decide which findings are valid before applying changes.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;More AI reviewers create more coverage, but also more cost and review noise. Agreement between several models is useful
evidence, not proof of correctness. Tests, static analysis, and accountable human review still provide different and
necessary layers of assurance.&lt;/p&gt;
&lt;h2 id=&quot;pros-cons&quot;&gt;Pros and Cons of Using AI Code Reviewers&lt;/h2&gt;
&lt;p&gt;AI code reviewers offer significant advantages, including fast first feedback and the ability to detect issues that a busy
human reviewer might miss. They can apply configured standards consistently across many pull requests. However, they also have
limitations, including false positives, incomplete domain knowledge, and no accountability for the final decision.
Balancing AI and human reviews can help mitigate these drawbacks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Time Savings&lt;/strong&gt;: AI code reviewers significantly reduce the time required for code reviews by automating the identification of bugs, code smells, and security vulnerabilities. This allows developers to focus on more complex tasks and reduces the overall time spent in the review process.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Consistency&lt;/strong&gt;: AI tools can apply the same configured standards across all code reviews without getting tired. This is useful for checking recurring team conventions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Additional Detection&lt;/strong&gt;: AI reviewers provide another pass over the change and can identify bugs, duplications, missing edge cases, and potential security threats that a human reviewer might overlook.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Lack of Knowledge Sharing&lt;/strong&gt;: One significant drawback of AI code reviews is the lack of human interaction, which is essential for knowledge sharing and mentoring among developers. Code reviews conducted by humans often serve as learning opportunities where experienced developers can share insights and best practices with junior team members.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Limited Contextual Understanding&lt;/strong&gt;: AI tools may lack the domain-specific and business context necessary to provide meaningful feedback. They might struggle to understand the broader implications of code changes within the specific context of a project or organization, leading to potentially less relevant or accurate suggestions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wrong Suggestions and Review Noise&lt;/strong&gt;: AI suggestions can be incorrect, insecure, or harmful. A tool that produces too many low-value comments can also train developers to ignore all of its feedback.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Privacy and Governance Questions&lt;/strong&gt;: A reviewer needs access to source code and sometimes issue, repository, or organizational context. Teams should understand what is sent to model providers, how long data is retained, and which deployment options are available.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;best-practices&quot;&gt;Best Practices for Using AI Code Reviews&lt;/h2&gt;
&lt;p&gt;To maximize the benefits of AI code reviewers, it is essential to combine them with human expertise.
It’s also a best practice to combine AI code reviewers that are based on large language models,
with &lt;a href=&quot;/automation/automated-code-reviews/&quot;&gt;rule-based static and dynamic analysis tools&lt;/a&gt;.
Use AI for initial reviews to catch obvious issues, followed by human reviews for contextual insights and mentoring.
Customizing AI tools to align with your project’s standards, using AI feedback as a learning tool,
and continuously evaluating the quality of its comments can further enhance their effectiveness.&lt;/p&gt;
&lt;p&gt;By integrating AI code review tools thoughtfully, development teams can achieve a harmonious balance that leverages the strengths of both automated and human reviews, leading to more robust and efficient code development processes.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Combine AI and Human Reviews&lt;/strong&gt;: Use AI code reviewers to handle the initial pass, identifying obvious issues and potential vulnerabilities. Follow up with human reviews to ensure contextual relevance and facilitate knowledge sharing among team members.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Combine with rule-based code review automation tools&lt;/strong&gt;: Make sure to integrate static and dynamic analysis checkers within your development lifecycle. You can use them either as pre-commit or post-commit hooks, and
many &lt;a href=&quot;/automation/automated-code-reviews/&quot;&gt;automated code review tools&lt;/a&gt; even leave comments on your reviews.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customize AI Tools&lt;/strong&gt;: Configure AI code review tools (if possible) to align with your project’s coding standards and practices. This can help improve the relevance and accuracy of the feedback provided by the AI.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Require Developers to Evaluate Suggestions&lt;/strong&gt;: Developers should understand an issue and its proposed fix before applying it. Do not turn a plausible-looking AI comment into an automatic change.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor Signal, Not Comment Volume&lt;/strong&gt;: Pilot a tool on a few repositories and track accepted, dismissed, and incorrect findings. Tune its rules and sensitivity based on that feedback.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Review Data Handling&lt;/strong&gt;: Check code retention, model-training policies, subprocessors, access permissions, and self-hosting options before connecting sensitive repositories.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use Multiple Review Passes Selectively&lt;/strong&gt;: For high-risk changes, consider independent, focused reviews with a second model or tool. Deduplicate the results and keep a human responsible for deciding which findings are valid.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;p&gt;By integrating some of the world’s best AI code reviewers effectively within the development workflow, teams can achieve a
balance that maximizes the strengths of both automated and human reviews, leading to higher quality and more secure code.
New AI code review tools are still popping up at a remarkable pace. While it is useful and often fun to evaluate them, the
number of comments a tool can generate is not a measure of review quality. The important questions are whether it finds
material issues, fits the team’s workflow, protects the code, and helps rather than distracts human reviewers.&lt;/p&gt;
&lt;p&gt;AI is not foolproof, and we must be careful that it does not introduce problems and errors into our code.
If you want to learn more about automation during code reviews, check out my article on &lt;a href=&quot;/automation/automated-code-reviews/&quot;&gt;static and dynamic code review tools&lt;/a&gt;, as well as
the &lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;best code review tools&lt;/a&gt;.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Best AI Code Review Tools 2026”: &lt;a href=&quot;https://www.awesomecodereviews.com/tools/ai-code-review-tools/&quot;&gt;https://www.awesomecodereviews.com/tools/ai-code-review-tools/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2026-07-24T09:59:30+02:00&quot;&gt;July 24, 2026&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[13 Best Automated Code Review Tools for Static Analysis and Security (2026)]]></title><description><![CDATA[Automated code review tools can find quality problems, security vulnerabilities, and policy violations before
a change reaches a human…]]></description><link>https://www.awesomecodereviews.com/automation/automated-code-reviews/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/automation/automated-code-reviews/</guid><pubDate>Thu, 09 May 2024 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Automated code review tools can find quality problems, security vulnerabilities, and policy violations before
a change reaches a human reviewer. Used well, they reduce repetitive review work and help teams find &lt;em&gt;certain&lt;/em&gt;
issues faster and more consistently. Automating mechanical checks is also a
&lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practice&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; This comparison focuses on static analysis, security scanning, and quality gates that run locally,
in CI, or on pull requests. If you want tools whose primary reviewer is a large language model, see the
separate comparison of &lt;a href=&quot;/tools/ai-code-review-tools/&quot;&gt;AI-based code review tools&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Last verified: July 23, 2026.&lt;/strong&gt; I selected tools that are actively maintained and useful during code review,
considering pull-request integration, language coverage, configurable quality gates, deployment options,
and whether developers can act on the findings.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This article covers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#code-analysis-platforms&quot;&gt;Code Analysis Platforms&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#codacy&quot;&gt;Codacy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#deepsource&quot;&gt;DeepSource&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#sonarqube&quot;&gt;SonarQube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#qlty&quot;&gt;Qlty&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#qodana&quot;&gt;Qodana&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#semgrep&quot;&gt;Semgrep&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#datadog&quot;&gt;Datadog Code Security&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#static-linting&quot;&gt;Static analysis and linting tools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#security&quot;&gt;Security-focused automated code review tools&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#snyk&quot;&gt;Snyk&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#codeql&quot;&gt;CodeQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#checkmarx&quot;&gt;Checkmarx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#codesonar&quot;&gt;CodeSonar&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#coverity&quot;&gt;Coverity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#spotbugs&quot;&gt;SpotBugs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Automated Code Review Tools &lt;!-- omit in toc --&gt;&lt;/h2&gt;
&lt;p&gt;The products below do not replace human review. They complement
&lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;manual code review tools&lt;/a&gt; by checking changes consistently and reporting findings
where developers already work. Some now use AI to explain or fix findings, but their core value still comes from
repeatable analysis, repository policies, and quality gates.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;th&gt;Primary analysis&lt;/th&gt;
&lt;th&gt;PR feedback or gates&lt;/th&gt;
&lt;th&gt;Free option&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Codacy&lt;/td&gt;
&lt;td&gt;Multi-language quality governance&lt;/td&gt;
&lt;td&gt;Quality, security, duplication, coverage&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Free open-source plan&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeepSource&lt;/td&gt;
&lt;td&gt;Automated remediation across common stacks&lt;/td&gt;
&lt;td&gt;Quality, SAST, SCA, secrets, IaC&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Free individual and open-source plans&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SonarQube&lt;/td&gt;
&lt;td&gt;Organization-wide “clean as you code” policies&lt;/td&gt;
&lt;td&gt;Quality, reliability, security, coverage&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Free Community Build&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qlty&lt;/td&gt;
&lt;td&gt;GitHub-centric linting and coverage&lt;/td&gt;
&lt;td&gt;Linting, coverage, maintainability, security&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Free cloud tier and CLI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qodana&lt;/td&gt;
&lt;td&gt;Teams already using JetBrains inspections&lt;/td&gt;
&lt;td&gt;Quality, licenses, dependencies, coverage&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Free Community license&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Semgrep&lt;/td&gt;
&lt;td&gt;Custom security and engineering policies&lt;/td&gt;
&lt;td&gt;SAST, SCA, secrets, custom rules&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Open-source CLI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Datadog Code Security&lt;/td&gt;
&lt;td&gt;Connecting code findings with runtime context&lt;/td&gt;
&lt;td&gt;SAST, SCA, IAST, secrets, IaC&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Commercial trial&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Snyk&lt;/td&gt;
&lt;td&gt;Developer-first application security&lt;/td&gt;
&lt;td&gt;SAST, SCA, containers, IaC&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Free and paid plans&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CodeQL&lt;/td&gt;
&lt;td&gt;Deep, queryable security analysis on GitHub&lt;/td&gt;
&lt;td&gt;Semantic SAST&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Free for public repositories&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Checkmarx&lt;/td&gt;
&lt;td&gt;Enterprise application-security programs&lt;/td&gt;
&lt;td&gt;SAST, SCA, IaC, API, containers&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Commercial&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CodeSonar&lt;/td&gt;
&lt;td&gt;Safety-critical and embedded software&lt;/td&gt;
&lt;td&gt;Whole-program and binary analysis&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Commercial trial&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Coverity&lt;/td&gt;
&lt;td&gt;Large, complex, or compliance-heavy codebases&lt;/td&gt;
&lt;td&gt;Deep static analysis&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Free service for registered open-source projects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SpotBugs&lt;/td&gt;
&lt;td&gt;Lightweight Java bug detection&lt;/td&gt;
&lt;td&gt;Java bytecode analysis&lt;/td&gt;
&lt;td&gt;Via CI integrations&lt;/td&gt;
&lt;td&gt;Open source&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&quot;code-analysis-platforms&quot;&gt;Code Analysis Platforms&lt;/h2&gt;
&lt;p&gt;Code analysis platforms combine multiple analyzers with repository-wide configuration, dashboards, pull-request
feedback, and quality gates. They are especially useful when a team needs consistent rules across several
repositories or programming languages. The difficult part is rarely turning on more rules; it is configuring
useful checks without overwhelming developers with noise.&lt;/p&gt;
&lt;h3 id=&quot;codacy&quot;&gt;Codacy&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.codacy.com/&quot;&gt;Codacy&lt;/a&gt; combines static analysis with security findings, duplication and complexity
metrics, and code coverage. Teams can choose the underlying tools and rules, define organization-wide coding
standards, and use quality gates to prevent new problems from being merged.&lt;/p&gt;
&lt;p&gt;Its current GitHub integration reports quality, security, and coverage information directly in pull requests.
Codacy can also provide generated patches for supported findings, while its AI Reviewer adds a contextual review
that uses source code and pull-request metadata. These features mean the older description of Codacy as a tool
that only lists issues is no longer accurate. Codacy is a good fit for teams that want one configurable view
across several languages and repositories. See the current
&lt;a href=&quot;https://docs.codacy.com/repositories/pull-requests/&quot;&gt;Codacy pull-request documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;deepsource&quot;&gt;DeepSource&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://deepsource.com/&quot;&gt;DeepSource&lt;/a&gt; analyzes pull requests and commits for code-health issues, security
vulnerabilities, secrets, infrastructure-as-code problems, dependency risks, and coverage. Its detailed issue
descriptions make findings useful for learning as well as enforcement.&lt;/p&gt;
&lt;p&gt;DeepSource’s Autofix remediation engine can propose changes, create a pull request from a default-branch
analysis, or commit an accepted fix to an existing pull-request branch. AI Review and AI-assisted Autofix are
available alongside deterministic analyzers. Review all generated changes and run your tests before accepting
them; automated remediation should shorten feedback loops, not bypass engineering judgment. The
&lt;a href=&quot;https://docs.deepsource.com/docs/product&quot;&gt;DeepSource product overview&lt;/a&gt; and
&lt;a href=&quot;https://docs.deepsource.com/docs/platform/getting-started/fix-issues&quot;&gt;Autofix documentation&lt;/a&gt; describe the
current workflow.&lt;/p&gt;
&lt;h3 id=&quot;sonarqube&quot;&gt;SonarQube&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.sonarsource.com/products/sonarqube/&quot;&gt;SonarQube&lt;/a&gt; covers maintainability, reliability, duplication,
coverage, and security. The product family includes IDE analysis, SonarQube Cloud, and self-managed SonarQube
Server, with a free Community Build available for smaller needs.&lt;/p&gt;
&lt;p&gt;Its strongest code-review feature is the focus on &lt;em&gt;new code&lt;/em&gt;: teams can apply a quality gate only to the changes
introduced by a pull request instead of blocking developers on an entire legacy backlog. Results can decorate
pull requests and prevent merging when a gate fails. Sonar Quick Fixes can edit supported findings, and paid
editions offer &lt;a href=&quot;https://docs.sonarsource.com/sonarqube-server/2025.5/ai-capabilities/ai-codefix&quot;&gt;AI CodeFix&lt;/a&gt; for
eligible issues. Careful rule and baseline configuration is still essential so that the tool reduces
&lt;a href=&quot;https://www.michaelagreiler.com/technical-debt-illusion/&quot;&gt;technical debt&lt;/a&gt; without creating alert fatigue.&lt;/p&gt;
&lt;h3 id=&quot;qlty&quot;&gt;Qlty&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://qlty.sh/&quot;&gt;Qlty&lt;/a&gt; is the successor to Code Climate Quality. Existing Code Climate customers were migrated
to Qlty, and the old Code Climate API was disabled in July 2025. Qlty keeps the earlier product’s focus on
maintainability and code coverage while adding faster local analysis, more plugins, security scanning, quality
gates, and AI-assisted fixes. See the official
&lt;a href=&quot;https://docs.qlty.sh/migration/overview&quot;&gt;Code Climate migration overview&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Qlty is particularly relevant for GitHub teams that want linting, auto-formatting, duplication, complexity,
coverage, and changed-code gates in one pull-request workflow. Its free CLI also lets developers reproduce many
checks locally before pushing. Teams moving from Code Climate should expect to review their configuration and
coverage uploader rather than treating Qlty as a drop-in rename.&lt;/p&gt;
&lt;h3 id=&quot;qodana&quot;&gt;Qodana&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.jetbrains.com/qodana/&quot;&gt;Qodana&lt;/a&gt; brings JetBrains’ IDE inspections into CI and pull requests. It
supports more than 60 languages and technologies, can establish a baseline for existing issues, and can fail a
pipeline when new findings exceed a configured severity threshold.&lt;/p&gt;
&lt;p&gt;Qodana is a natural choice for teams already relying on IntelliJ-based IDEs because local inspections and CI
checks can use the same analysis engine. Reports can also be viewed in JetBrains IDEs or Visual Studio Code.
For supported issues, Quick-Fixes can be applied through a generated pull request rather than by editing code
blindly. The &lt;a href=&quot;https://www.jetbrains.com/help/qodana/about-qodana.html&quot;&gt;Qodana documentation&lt;/a&gt; describes its free
Community license and paid team features.&lt;/p&gt;
&lt;h3 id=&quot;semgrep&quot;&gt;Semgrep&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://semgrep.dev/&quot;&gt;Semgrep&lt;/a&gt; is a fast, pattern-based analysis tool with products for static application
security testing, software composition analysis, and secrets detection. Its open-source CLI is useful on a
developer machine or in CI, while the platform adds centralized policies, triage, and pull-request integration.&lt;/p&gt;
&lt;p&gt;Semgrep is especially useful when a team wants to encode organization-specific review guidance. A short custom
rule can flag a dangerous API, an insecure framework pattern, or a convention that reviewers otherwise repeat
manually. Findings can appear as pull-request comments or block a merge in CI. Start with a small, high-confidence
ruleset: custom rules are powerful, but a noisy policy will be ignored. Semgrep’s documentation includes examples
for &lt;a href=&quot;https://semgrep.dev/docs/writing-rules/rule-ideas&quot;&gt;automating recurring code-review comments&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;datadog&quot;&gt;Datadog Code Security&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.datadoghq.com/security/code_security/&quot;&gt;Datadog Code Security&lt;/a&gt; combines static code analysis,
software composition analysis, runtime code analysis, secrets
scanning, and infrastructure-as-code security. Diff-aware comments can report new findings directly on GitHub,
GitLab, or Azure DevOps pull requests, while PR gates can enforce severity thresholds. The differentiator is
runtime context: teams already using Datadog can connect repository findings with services running in
production and prioritize vulnerabilities that affect deployed code. See Datadog’s current
&lt;a href=&quot;https://docs.datadoghq.com/code_analysis/github_pull_requests&quot;&gt;pull-request comment documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;static-linting&quot;&gt;Static analysis and linting tools&lt;/h2&gt;
&lt;p&gt;You may not need a platform if one or two language-specific tools cover your stack. For JavaScript and TypeScript,
common choices include &lt;a href=&quot;https://eslint.org/&quot;&gt;ESLint&lt;/a&gt; and &lt;a href=&quot;https://biomejs.dev/&quot;&gt;Biome&lt;/a&gt;. Python teams can use
&lt;a href=&quot;https://docs.astral.sh/ruff/&quot;&gt;Ruff&lt;/a&gt; or &lt;a href=&quot;https://pylint.readthedocs.io/&quot;&gt;Pylint&lt;/a&gt;, while Ruby teams often use
&lt;a href=&quot;https://rubocop.org/&quot;&gt;RuboCop&lt;/a&gt;. Java projects can add &lt;a href=&quot;https://pmd.github.io/&quot;&gt;PMD&lt;/a&gt; or SpotBugs, and C/C++
projects can use &lt;a href=&quot;https://clang.llvm.org/extra/clang-tidy/&quot;&gt;clang-tidy&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Keep analysis and formatting conceptually separate. Tools such as Black and Prettier primarily format code;
linters and static analyzers look for bugs, risky patterns, or policy violations. Many tools do both, but the
distinction helps teams decide which checks may safely auto-fix code and which deserve human review. Run fast,
deterministic checks locally or in a pre-commit hook, then repeat the important gates in CI.&lt;/p&gt;
&lt;h2 id=&quot;security&quot;&gt;Security-focused automated code review tools&lt;/h2&gt;
&lt;h3 id=&quot;snyk&quot;&gt;Snyk&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://snyk.io/&quot;&gt;Snyk&lt;/a&gt; is a developer-focused application-security platform. Snyk Open Source finds vulnerable
dependencies and license risks, while Snyk Code analyzes first-party source code. Snyk Container and Snyk
Infrastructure as Code extend that coverage to images, Kubernetes, Terraform, and other deployment definitions.&lt;/p&gt;
&lt;p&gt;Developers can run Snyk locally, in an IDE, in CI/CD, or through a source-control integration. Pull-request checks
can prevent a newly introduced vulnerability or policy violation from being merged, and supported findings
include remediation guidance. This broader product scope replaces the older characterization of Snyk as only a
dependency checker. The &lt;a href=&quot;https://docs.snyk.io/scan-with-snyk&quot;&gt;Snyk scanning overview&lt;/a&gt; explains the current
products and scanning methods.&lt;/p&gt;
&lt;h3 id=&quot;codeql&quot;&gt;CodeQL&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;/automation/codeql/&quot;&gt;CodeQL&lt;/a&gt; is a powerful static analysis tool developed by GitHub that can
be used to find security vulnerabilities and bugs in code.
It works by analyzing the source code of a program and building a database of information about how the code works.&lt;/p&gt;
&lt;p&gt;CodeQL is designed to be highly flexible, allowing developers to create their own queries to search for specific
types of issues in their code. It can be used to find a wide range of issues, including buffer overflows,
injection vulnerabilities, and other security vulnerabilities.
&lt;a href=&quot;https://docs.github.com/en/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql&quot;&gt;GitHub code scanning&lt;/a&gt;
can run standard or custom CodeQL queries on pull requests and report findings before merge. CodeQL is free for
public repositories; private repository use is part of GitHub’s paid security offering.&lt;/p&gt;
&lt;h3 id=&quot;checkmarx&quot;&gt;Checkmarx&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://checkmarx.com/&quot;&gt;Checkmarx One&lt;/a&gt; is a commercial application-security platform covering SAST, software
composition analysis, infrastructure as code, API security, containers, and software-supply-chain risks. Its
static analysis uses data-flow techniques to detect issues such as injection vulnerabilities, cross-site
scripting, and unsafe memory handling across a broad set of languages.&lt;/p&gt;
&lt;p&gt;Checkmarx now integrates directly with the code-review lifecycle. It supports GitHub, GitLab, Azure DevOps, and
Bitbucket repository integrations; opening or updating a pull request can trigger a scan and add a PR decoration
summarizing new issues, fixed issues, and policy violations. Developers follow links to the full findings and
remediation guidance in Checkmarx One. See the current
&lt;a href=&quot;https://docs.checkmarx.com/en/34965-691561-code-repository-integration-usage---results.html&quot;&gt;repository integration documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;codesonar&quot;&gt;CodeSonar&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.adacore.com/codesonar&quot;&gt;CodeSonar&lt;/a&gt; is a commercial static analysis product from AdaCore. CodeSecure
merged with AdaCore in 2025, so older CodeSecure product links and ownership references are no longer current.&lt;/p&gt;
&lt;p&gt;CodeSonar performs deep, whole-program analysis of source code and binaries. It focuses on difficult defects such
as buffer overflows, null-pointer dereferences, use-after-free errors, tainted data flows, and concurrency
problems. In addition to C and C++, it supports languages including Java, C#, Go, Python, JavaScript, TypeScript,
Kotlin, and Rust. Its strongest fit is enterprise, embedded, safety-critical, and high-integrity software where
teams need standards such as MISRA, CERT, ISO 26262, or DO-178C and can justify a heavier analysis setup.&lt;/p&gt;
&lt;h3 id=&quot;coverity&quot;&gt;Coverity&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.blackduck.com/static-analysis-tools-sast/coverity.html&quot;&gt;Coverity Static Analysis&lt;/a&gt; is an
enterprise-grade product from Black Duck. It builds a structural model of a codebase to identify security and
quality defects across files, functions, and execution paths. It is best suited to large or complex systems that
need deep analysis, compliance reporting, IDE feedback, and support for functional-safety standards.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://scan.coverity.com/&quot;&gt;Coverity Scan&lt;/a&gt; remains available at no charge for registered open-source projects.
That service began through a U.S. Department of Homeland Security initiative, but Black Duck now manages it. The
free service and the commercial Coverity product should be described separately so readers understand which
option applies to them.&lt;/p&gt;
&lt;h3 id=&quot;spotbugs&quot;&gt;SpotBugs&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/spotbugs/spotbugs&quot;&gt;SpotBugs&lt;/a&gt; is the actively maintained successor to FindBugs. It is an
open-source static analyzer that inspects Java bytecode for bug patterns such as null-pointer mistakes, resource
leaks, incorrect equality checks, and concurrency problems.&lt;/p&gt;
&lt;p&gt;SpotBugs can run standalone or through Maven, Gradle, Ant, Eclipse, IntelliJ IDEA, and SonarQube integrations.
Unlike the hosted platforms above, it does not provide a complete code-review dashboard by itself; teams normally
run it in CI and publish or annotate its results through their build platform. That makes it a strong lightweight
choice for Java projects that want deterministic bug detection without adopting a broader commercial platform.&lt;/p&gt;
&lt;!-- ## Advantages of using automated code review tools

## Disadvantages of using automated code review tools
1) Limited scope: Automated tools can only catch issues that they have been programmed to identify. They are not able to identify more complex issues that require human understanding or judgment.
2) False positives: Automated tools can sometimes flag code as problematic that is actually functioning correctly, which can create confusion and waste time.
3) Lack of context: Automated tools may not be able to understand the larger context of the code, such as the business requirements or user needs. This can result in false negatives, where actual issues are missed.
4) Cost: Some automated code review tools can be expensive, especially for large codebases or enterprise-level projects.
5) Learning curve: Some automated code review tools can be complex to set up and use, which can require time and resources to learn and integrate into a project.
6) False sense of security: Over-reliance on automated tools can create a false sense of security, leading developers to believe that all issues have been caught and there is no need for manual review or testing.
7) Slows down development: Some static analysis or dynamic analysis tools take quite a long time to execute and check the code, either locally or in the CI/CD pipeline. This slows down the development cycle and can, similar to long-running test suites, become a distraction and lead to context switching, and a lack of focus for the developer. 

## How does automated code review work? 
The basis for all techniques used by the tools listed here is that the automatic code 
review software checks the code against some pre-defined rules.
The secret sauce behind the different automated code review tools can differ, but it is always based on 
techniques to analyze code, such as static, dynamic and data-flow or control-flow analysis. The tools 
focusing more on security also integrate [SATS](/security/static-application-security-testing/) and [DATS](/security/dynamic-application-security-testing/) technology.

For example, a linting rule of ESLInt is [&quot;no-unreachable&quot;](https://eslint.org/docs/latest/rules/no-unreachable). 
This rule disallows unreachable code after `return, throw, continue,` and `break` statements.


```
 function fn() {
    x = 1;
    return x;
    x = 3; // this will never execute
}
```


## False Positives and Noise

For example, a linting rule of ESLInt is [&quot;no-self-assign&quot;](https://eslint.org/docs/latest/rules/no-self-assign). 
This rule disallows assignments where both sides are exactly the same.

If you have the following code, the linting rule would detect an error, because the variable is assigned to itself and therefore has no effect.

` foo = foo;`

This is, a very basic rule, but automated analysis rules can become much more involved, which often also leads to false-positives, which are issues that are reported by the system, but that are not incorrect or wrong.
Even for the rule discussed above, one could argue this is not an actual error. But this does not fall under a false negative. If so, it would fall under noise, which is also a common problem of automatic code checkers.  

![Critical review for static analysis and report issues that are not issues](critical-review-static-analysis.jpg)

### Static, dynamic and data-flow
Let&apos;s look more closely at the most widely used source code analysis techniques that automatic code review tools are based upon.

Static analysis tools analyze the code without actually executing it. They check the code for syntax errors, coding standards, potential bugs, and security vulnerabilities. 

Dynamic analysis tools, on the other hand, execute the code and analyze it while it&apos;s running. They check the code for performance issues, memory leaks, and other runtime issues.

Data flow analysis tools identify how data flows through the program and can be useful for identifying complex issues that may be difficult to find through manual code review or other types of automated tools. However, they may also generate a high number of false positives and require significant resources to run, which can impact their practicality for use in some development environments.

## Comparing automatic code review to manual review
Automatic code reviews using static analysis tools and 
In a study about [effort reduction during code reviews](https://ieeexplore.ieee.org/abstract/document/8103456), 
researchers showed the issues detected by static analysis and by manual code review to overlap 16% of the time.
Similarly, during a study by OWASP, they showed that automatic security scanning tools find different issues than manual security reviews. 

This shows, that first, manual code review effort can be reduced by static analysis tools, and second, that manual reviews and static analysis complement each other, yet you can not use one technique to replace the other.  --&gt;
&lt;h2&gt;Conclusion &lt;!-- omit in toc --&gt;&lt;/h2&gt;
&lt;p&gt;The best automated code review setup is usually a small, complementary stack rather than one tool with every
possible rule enabled. Run fast formatters and linters locally, apply quality and security gates only to changed
code, and reserve human review for behavior, architecture, tradeoffs, and shared understanding.&lt;/p&gt;
&lt;p&gt;Choose a tool that supports your languages and code host, reports findings where developers will act on them,
and lets your team tune or suppress noisy rules. Then pilot it on a few repositories and measure useful findings,
false positives, and feedback time before expanding it.&lt;/p&gt;
&lt;p&gt;Static analysis is only one form of automation. For contextual, LLM-based feedback, compare the
&lt;a href=&quot;/tools/ai-code-review-tools/&quot;&gt;current AI code reviewers&lt;/a&gt;. You can also review the
&lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;best manual code review tools&lt;/a&gt; for managing discussions, approvals, and the rest
of the review lifecycle.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “13 Best Automated Code Review Tools for Static Analysis and Security (2026)”: &lt;a href=&quot;https://www.awesomecodereviews.com/automation/automated-code-reviews/&quot;&gt;https://www.awesomecodereviews.com/automation/automated-code-reviews/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2026-07-23T09:59:30+02:00&quot;&gt;July 23, 2026&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Bottom-Up Code Review]]></title><description><![CDATA[During a bottom-up code review, the reviewer starts with reviewing single lines of code, small blocks of code, or small individual functions…]]></description><link>https://www.awesomecodereviews.com/code-reading/bottom-up-code-review/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/code-reading/bottom-up-code-review/</guid><pubDate>Thu, 25 Apr 2024 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;During a bottom-up code review, the reviewer starts with reviewing single lines of code, small blocks of code, or small individual functions.
By inspecting those low-level elements, the reviewer builds an understanding of how these elements operate,
how code is structured, and how those elements contribute to the system’s overall functionality.&lt;/p&gt;
&lt;p&gt;This article covers the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#when&quot;&gt;When to use a bottom-up code review approach?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#code&quot;&gt;Code example for bottom-up reviewing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#guide&quot;&gt;Step-by-step guide to review code bottom-up&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#summary&quot;&gt;Summary&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br/&gt;
&lt;hr&gt;
&lt;p&gt;Are you ready to learn more? Then sign-up, or log-in: It’s free.&lt;/p&gt;
&lt;hr&gt;
&lt;br/&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Bottom-Up Code Review”: &lt;a href=&quot;https://www.awesomecodereviews.com/code-reading/bottom-up-code-review/&quot;&gt;https://www.awesomecodereviews.com/code-reading/bottom-up-code-review/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2024-04-25T09:59:30+01:00&quot;&gt;April 25, 2024&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Code Review Techniques]]></title><description><![CDATA[Here is a list of articles that help you to learn more about different code review techniques: 1. Checklist-based Code Reviews 2. 10 Best…]]></description><link>https://www.awesomecodereviews.com/code-reading/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/code-reading/</guid><pubDate>Thu, 25 Apr 2024 08:59:30 GMT</pubDate><content:encoded>&lt;h3&gt;Here is a list of articles that help you to learn more about different code review techniques:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;&lt;strong&gt;1. Checklist-based Code Reviews&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/code-reading/code-review-techniques/&quot;&gt;&lt;strong&gt;2. 10 Best Review Techniques&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/automation/copilot-review/&quot;&gt;&lt;strong&gt;3. Copilot for Automated Code Reviews&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/code-reading/test-driven-code-review/&quot;&gt;&lt;strong&gt;4. Test-Driven Reviews&lt;/strong&gt;&lt;/a&gt; &lt;em&gt;(member content)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/code-reading/top-down-code-review/&quot;&gt;&lt;strong&gt;5. Top-Down Code Review&lt;/strong&gt;&lt;/a&gt; &lt;em&gt;(member content)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/code-reading/bottom-up-code-review/&quot;&gt;&lt;strong&gt;6. Bottom-Up Code Review&lt;/strong&gt;&lt;/a&gt; &lt;em&gt;(member content)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Code Review Techniques”: &lt;a href=&quot;https://www.awesomecodereviews.com/code-reading&quot;&gt;https://www.awesomecodereviews.com/code-reading&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2024-04-25T09:59:30+01:00&quot;&gt;April 25, 2024&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[10 Best Code Review Techniques]]></title><description><![CDATA[Systematically reviewing source code is an essential part of ensuring code quality and correctness of
the code. Yet, most developers review…]]></description><link>https://www.awesomecodereviews.com/code-reading/code-review-techniques/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/code-reading/code-review-techniques/</guid><pubDate>Mon, 22 Apr 2024 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Systematically reviewing source code is an essential part of ensuring code quality and correctness of
the code. Yet, most developers review their code &lt;em&gt;ad hoc&lt;/em&gt;, which means they do not have any formal, or
even explicit code review approach that they can easily describe. While a few formal code review
techniques exist, they are not widely known.
In this article, I show you different code review techniques you can use to make your code review
approach more systematic, explicit, and effective. Those techniques are either dedicated code review techniques, or techniques from other development disciples, such as code reading, testing, or debugging,
that I adapted to facilitate the task of code reviewing to help you find more bugs, and understand the
code under review better.&lt;/p&gt;
&lt;h2&gt;Modern code review is ad-hoc&lt;/h2&gt;
&lt;p&gt;Most programmers review code in an &lt;em&gt;ad hoc&lt;/em&gt; manner. This means there is no explicit, formal, or systematic process
that the team agreed upon to review code. Instead, the developers intuitively review source code files based on their experience.&lt;/p&gt;
&lt;p&gt;Which files, methods and even statements developers look at, and in which order, is up to the individual developer,
and often even up to their current mood.
Similarly, which aspect or issues they look for in code is not well defined, and can change from developer to developer.&lt;/p&gt;
&lt;h2&gt;Junior developers struggle without concrete review techniques&lt;/h2&gt;
&lt;p&gt;While programmers develop their individual techniques for code reviewing over time,
those techniques are implicit, vary from person to person, and
often only live in the developers’ heads.
Junior developers therefore often wonder how exactly they should review code, and what to look for.
They learn how to review code by copying and mimicking what they see their peers do in code review.
However, this process to learn code reviews is neither efficient nor effective.
It also means that each team member will have a slightly (or vastly) different approach to review code.&lt;/p&gt;
&lt;h2&gt;Transforming implicit to explicit knowledge&lt;/h2&gt;
&lt;p&gt;One of the best code review hacks a team can embrace is to transform the implicit knowledge that
experienced developers on their team have (basically in their head), into explicit knowledge.&lt;/p&gt;
&lt;p&gt;During such a transformation process, the experienced developer describes in detail what they do during a code review.
Over time, those explicit guides to reviewing code, can become one overall guideline that describes how code is
reviewed within a team.
Such a guideline serves two purposes: First, it streamlines how a team reviews code, and
second, it allows people new to the team to learn quickly what is important during code reviewing.&lt;/p&gt;
&lt;h2&gt;Formal, systematic, and explicit review techniques&lt;/h2&gt;
&lt;p&gt;In addition to learning from the experience of senior developers, we can also learn from formal, systematic, and explicitly
described techniques for code inspection, code review and code reading.&lt;/p&gt;
&lt;p&gt;In this blog post, I show you some of the code review techniques I also teach
in my &lt;a href=&quot;/workshops/&quot;&gt;code review workshops&lt;/a&gt;.
This can help you to transform your implicit and &lt;em&gt;ad hoc&lt;/em&gt; reviewing techniques into
explicit and more systematic approaches.&lt;/p&gt;
&lt;h2&gt;Systematic Code Review Approaches&lt;/h2&gt;
&lt;p&gt;We will look at the following systematic code review approaches:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;a href=&quot;#checklist&quot;&gt;Checklist-based Code Reviews&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#test-driven&quot;&gt;Test-Driven Code Reviews&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#bottom-up-top-down&quot;&gt;Bottom-up versus Top-Down Code Reading&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#control-flow-data-flow&quot;&gt;Control-flow versus Data-flow Code Reviews&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#pattern&quot;&gt;Pattern Recognition&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#referencing&quot;&gt;Cross-Referencing&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#change-impact&quot;&gt;Change-Impact Analysis&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#trace&quot;&gt;Trace-Based Code Reading&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#abstract&quot;&gt;Abstract-Driven Code Reviews&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#functionality&quot;&gt;Functionality or Use-Case-Driven Code Reviews&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt; 
&lt;/br&gt;
&lt;h2 id=&quot;checklist&quot;&gt;1. Checklist-based Code Reviews&lt;/h2&gt;
&lt;p&gt;One of my favorite code review techniques involves using a checklist.
They are by far the most widely used &lt;em&gt;systematic&lt;/em&gt; code review technique because the approach is
straightforward to implement and does not involve a lot of additional effort.
In empirical research, checklist-based code reviews have also been shown as very effective.&lt;/p&gt;
&lt;p&gt;Checklist-based code reviews involve using a predefined list of items or criteria to assess the code.
A checklist can focus on a variety of factors such as coding standards, design principles,
security guidelines, and performance considerations.
You can find a &lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;code review checklist&lt;/a&gt; that covers
a wide range of topics here.
Sometimes, only one of those factors, for example, security, is the focus of such a checklist.
This makes sense when you want to perform a more thorough review in this specific area.
Have a look at this &lt;a href=&quot;/checklists/secure-code-review-checklist/&quot;&gt;security-focused code review checklist&lt;/a&gt;
as an example.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Provides a systematic and structured method for reviewing code, ensuring consistency and thoroughness.&lt;/li&gt;
&lt;li&gt;Helps reviewers focus on important aspects that might be overlooked otherwise.&lt;/li&gt;
&lt;li&gt;Assists in educating new team members about coding standards and best practices.&lt;/li&gt;
&lt;li&gt;Functions as a memory aid, ensuring important aspects are checked.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Correct usage of the checklist might be unclear or confusing.&lt;/li&gt;
&lt;li&gt;Aspects not covered by the list might be overlooked.&lt;/li&gt;
&lt;li&gt;May lack flexibility, as not all checklist items are applicable to every piece of code.&lt;/li&gt;
&lt;li&gt;It might be not clear where to look, as no order for inspection was given.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Learn more about &lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;checklist-based reading here&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;test-driven&quot;&gt;2. Test-Driven Code Reviews&lt;/h2&gt;
&lt;p&gt;During test-driven code reviews, the code reviewer starts by reviewing the test code before they
review the production code. The rationale behind this approach is to use the test cases as use cases that explain the code.
Thus, the code reviewer learns about the production code when they look at the test code, which helps
them create a mental model.
The tests are used as a specification of what the software is supposed to do, and the code reviewer
learns about the assumption the code author had about the code
through the tests.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Helps improve the test code quality and thus maintainability and quality of the code.&lt;/li&gt;
&lt;li&gt;Ensures high test coverage and quality.&lt;/li&gt;
&lt;li&gt;Encourages writing meaningful tests that truly validate the code.&lt;/li&gt;
&lt;li&gt;Tests can help the developer understand the production code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Depends heavily on the quality of the tests themselves.&lt;/li&gt;
&lt;li&gt;Can’t be done in the absence of tests.&lt;/li&gt;
&lt;li&gt;Tests might replicate the misunderstandings of the code author about the code’s specification.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Learn more about &lt;a href=&quot;/code-reading/test-driven-code-review/&quot;&gt;test-driven code reviewing here.&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;bottom-up-top-down&quot;&gt;3. Bottom-up and Top-Down Code Reading&lt;/h2&gt;
&lt;p&gt;All code reading techniques can be broadly categorized also into bottom-up or top-down reading.
Most of the time, we use a combination of those two approaches. So, let’s have a more detailed look!&lt;/p&gt;
&lt;h3 id=&quot;bottom&quot;&gt;Bottom-up Code Reading&lt;/h3&gt;
&lt;p&gt;Bottom-up reading means that the developer starts reading, understanding, and reviewing small fragments of the code first.
Based on those small fragments, like single code statements, or small methods the developer works their way up to understand and evaluate
more and more of the functionality and quality of the software under review.
This way, the developer gradually builds a picture of how code elements interact to form the larger system.&lt;/p&gt;
&lt;p&gt;Bottom-up code reviewing works well when reviewing a small, self-contained piece of code, like a function or a class.
On the other hand, it also works well, when you have to review a larger piece of software you are
completely unfamiliar with that lacks documentation.&lt;/p&gt;
&lt;!-- Learn more about [bottom-up code reviews](/code-reading/bottom-up-code-review/) here. --&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Developers build a thorough understanding of the nitty-gritty details of the code.&lt;/li&gt;
&lt;li&gt;Helps to effectively identify &lt;em&gt;local&lt;/em&gt; issues, bugs, and inefficiencies.&lt;/li&gt;
&lt;li&gt;The developer needs less overall context about the system, making it suitable for new team members or for reviewing isolated components.&lt;/li&gt;
&lt;li&gt;Works well for unclear or unfamiliar legacy code, or code that isn’t documented.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It is a time-consuming approach due to the focus on details.&lt;/li&gt;
&lt;li&gt;Reviewers might miss the big picture, as well as architectural or higher-level design problems.&lt;/li&gt;
&lt;li&gt;When confronted with a large code change, starting at the lowest level can be overwhelming and inefficient.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;top-down&quot;&gt;Top-down Reading&lt;/h3&gt;
&lt;p&gt;In a top-down reading approach, the software developer starts by reading, for example,
a user story or the documentation of the software first. These often non-code artifacts
already explain the purpose of the code under review and give the reviewer an overview of what to expect.
Then, the reviewer examines the overall structure and components of the systems.
The goal is to build a mental model of the system before looking at the code in more detail.
In a later step, the reviewer tries to find the most significant method(s),
that drive the functionality and starts reviewing in more detail from there.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This approach helps build an understanding of the system’s architecture and high-level design.&lt;/li&gt;
&lt;li&gt;It is effective in spotting problems with the overall design, structure, and integration points.&lt;/li&gt;
&lt;li&gt;The approach is suited for larger code changes or even complete codebases.&lt;/li&gt;
&lt;li&gt;It helps prioritize which parts of the code to focus on for a more detailed review.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reviewers using only a top-down approach might overlook specific low-level coding issues or bugs.&lt;/li&gt;
&lt;li&gt;Requires the reviewers to have a good understanding of the overall system, which might not be feasible for newcomers.&lt;/li&gt;
&lt;li&gt;By examining only high-level artifacts, the reviewer might make incorrect assumptions about how high-level designs are implemented at the lower levels.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Learn more about &lt;a href=&quot;/code-reading/top-down-code-review/&quot;&gt;top-down code reviews&lt;/a&gt; here.&lt;/p&gt;
&lt;h3&gt;Combining bottom-up and top-down code reviewing&lt;/h3&gt;
&lt;p&gt;In practice, a combination of both approaches is often used.
Starting with a top-down review helps understand the system’s architecture and major components,
setting the stage for a more detailed, bottom-up review of specific areas of interest or concern.
This combined approach ensures the architectural integrity and the detailed correctness of the code.&lt;/p&gt;
&lt;h2 id=&quot;control-flow-data-flow&quot;&gt;4. Control-flow and Data-flow Code Reviews&lt;/h2&gt;
&lt;p&gt;Two other complementary code review approaches are control-flow and data-flow code reading.
Control-flow reading follows the execution of the program, whereby during data-flow reading you follow the data.&lt;/p&gt;
&lt;h3 id=&quot;control-flow&quot;&gt;Control-flow Code Reviews&lt;/h3&gt;
&lt;p&gt;Control-flow reading focuses on understanding how the &lt;em&gt;program’s execution&lt;/em&gt; progresses.
It examines the order in which statements, instructions, or function calls are executed
and how the program moves from one part to another.
This includes looking at loops, conditional statements, function calls, and recursion.
Control-flow driven code reviews are great for finding logical errors.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Highly effective in spotting logical problems with the flow of execution, such as loops, conditionals, and sequence of operations.&lt;/li&gt;
&lt;li&gt;Essential for understanding the execution order and for debugging issues like infinite loops or unexpected branches in logic.&lt;/li&gt;
&lt;li&gt;Helps in understanding the overall structure of the program, particularly the execution order and the interrelation of various components.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reviewers might miss issues related to data handling or data integrity.&lt;/li&gt;
&lt;li&gt;It is less effective for data-intensive applications.&lt;/li&gt;
&lt;li&gt;Complex to perform in event-driven systems due to the non-linear progression of execution.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;data-flow&quot;&gt;Data-Flow Code Reviewing&lt;/h3&gt;
&lt;p&gt;Data-flow reading focuses on how &lt;em&gt;data&lt;/em&gt; moves through the program.
This includes tracking the source, use, and modification of variables and data structures,
understanding how data is passed between functions, and examining how data state changes over time.
Data-flow code reviewing is particularly useful when looking at the code with a security lens.
It helps identify data leaks or points where sensitive data might be compromised.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Effective in identifying problems related to data handling, such as data corruption, improper use of data structures, and issues with data lifecycle.&lt;/li&gt;
&lt;li&gt;Particularly useful for uncovering security flaws that stem from the misuse of data, like buffer overflows or injection attacks.&lt;/li&gt;
&lt;li&gt;Helps in tracing how data moves through the system, which is crucial for understanding complex interactions and dependencies.&lt;/li&gt;
&lt;li&gt;Can identify inefficiencies in how data is processed, leading to opportunities for performance optimization.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tracing data flow can be challenging, especially in large codebases with numerous data paths and interactions.&lt;/li&gt;
&lt;li&gt;Requires a detailed and thorough examination of how data is handled, manipulated, and transformed, which can be time-intensive.&lt;/li&gt;
&lt;li&gt;Focusing primarily on data flow can lead to overlooking issues related to control flow, such as logic errors or incorrect program sequencing.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Combining control-flow and data-flow code reviewing&lt;/h3&gt;
&lt;p&gt;In practice, both control-flow and data-flow reading modes are often used together during code review.
Understanding how data is handled (data-flow) is crucial for evaluating the logic and sequence of operations (control-flow).
For example, in a function with complex logic, you might use control-flow reading to understand the sequence of operations
while simultaneously using data-flow reading to see how data is manipulated throughout those operations.
This integrated approach provides a comprehensive understanding of the code, helping to identify both logical
errors and data-related issues.&lt;/p&gt;
&lt;h2&gt;Code Reading, Debugging and Program Understanding techniques&lt;/h2&gt;
&lt;p&gt;While reviewing code, we can make use of general code reading, debugging and program comprehension techniques.
In the following, I’ll briefly highlight some of the most useful techniques.&lt;/p&gt;
&lt;h3 id=&quot;pattern&quot;&gt;5. Pattern Recognition&lt;/h3&gt;
&lt;p&gt;During pattern recognition, the code reviewer uses mostly a &lt;a href=&quot;#top-down&quot;&gt;top-down approach&lt;/a&gt; to identify common patterns in the code.
Such patterns include design patterns, algorithmic patterns, or idiomatic expressions in the programming language.
Pattern recognition during code reviewing is helpful to create a mental model of the software system, but also
to identify problems with the software’s architecture, or the design of algorithms.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Helps create a mental model of the code change and the structure of the code.&lt;/li&gt;
&lt;li&gt;Streamlines the review process and leads to more consistent review approaches even amongst different team members.&lt;/li&gt;
&lt;li&gt;Well suited to find problems within the software architecture or design.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Due to the focus on patterns, reviewers might overlook other problems.&lt;/li&gt;
&lt;li&gt;Using known and common patterns to judge code, can bias the reviewers and they might dismiss good, new approaches, just because they are not established yet.&lt;/li&gt;
&lt;li&gt;Reviewers need a broad knowledge of patterns and anti-patterns to look for.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- Reference: &quot;Code Reading: The Open Source Perspective&quot; by Diomidis Spinellis also touches upon recognizing patterns in code.--&gt;
&lt;h3 id=&quot;referencing&quot;&gt;6. Cross-Referencing&lt;/h3&gt;
&lt;p&gt;During cross-referencing, the code reviewer systematically reviews the dependencies and relationships between code
elements, such as classes, functions or variables. This approach is suitable to understand the interdependencies and also the
impact change can have on the system.
As manual cross-referencing is a tedious task, code reviewers can use tools to extract, display or visualize this information.
Most IDE’s provide built-in tools that help with cross-referencing, which is also often used during code refactoring.
These tools build an index of all code elements and link them, which helps during navigation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Finds dependencies, and relationships and reveals how a change impacts the rest of the system.&lt;/li&gt;
&lt;li&gt;Allows the reviewer to build a deep understanding of the codebase, and the code change under review.&lt;/li&gt;
&lt;li&gt;Reviewers get a good understanding of the control flow and the data flow, thus allowing them to identify errors in execution &lt;em&gt;and&lt;/em&gt; data manipulation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If done manually, cross-referencing is tedious and error-prone.&lt;/li&gt;
&lt;li&gt;For larger code changes and systems might be overwhelming for the reviewer.&lt;/li&gt;
&lt;li&gt;Focusing too much on relationships and dependencies between artifacts can lead to overlooking other issues.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;change-impact&quot;&gt;7. Change-Impact Analysis&lt;/h3&gt;
&lt;p&gt;During change-impact analysis, the reviewer gathers information to be able to
judge how the code change will impact the rest of the system.&lt;/p&gt;
&lt;p&gt;While cross-referencing can be used as part of a change-impact analysis, a change-impact analysis is broader and also involves
analyzing more high-level artifacts, such as specifications, documentations to understand the impact of the code change.
A reviewer will normally start by understanding the rationale behind the code change, and its description (&lt;a href=&quot;#top-down&quot;&gt;top-down&lt;/a&gt;).
Then, the reviewer will identify affected components, analyze the dependency graph and assess the impact of this
change on the functionality of the overall system. During such an analysis the reviewer should also
look at the impact on the test system: does it need tests to change, or the be added?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Discussions on the impact of code changes can improve the understanding a team has of the overall codebase.&lt;/li&gt;
&lt;li&gt;Allows to direct reviewing efforts towards impacted and high-risk parts of the codebase.&lt;/li&gt;
&lt;li&gt;Reduces the risk of introducing bugs or regressions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Change impact analysis can be very time-consuming.&lt;/li&gt;
&lt;li&gt;The reviewer has to have already a good and deep understanding of the codebase to understand the impact.&lt;/li&gt;
&lt;li&gt;It can lead to analysis paralysis, because the reviewer cannot completely envision all potential&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;impacts of this code change, and is thus reluctant to approve it.&lt;/p&gt;
&lt;!-- Reference: &quot;Software Change Impact Analysis&quot; by Shawn A. Bohner and Robert S. Arnold delves into methods for assessing the effects of code changes. --&gt;
&lt;!-- &lt;h3 id=&quot;scenario&quot;&gt;Scenario-Based Code Reading&lt;/h3&gt;

Understanding the code by considering how it would behave in different scenarios or use cases.
Reference: &quot;Software Engineering: A Practitioner&apos;s Approach&quot; by Roger S. Pressman provides an extensive look into various software engineering practices, including understanding code through scenarios. --&gt;
&lt;h3 id=&quot;trace&quot;&gt;8. Trace-Based Code Reading&lt;/h3&gt;
&lt;p&gt;Trace-based reading, often used during debugging, involves following the execution of code at runtime. The code reviewer can do this
by stepping through the code in a debugger or by examining logs or output traces.&lt;/p&gt;
&lt;p&gt;Most code reviewers use a static control-flow approach to review code, instead of this dynamic code analysis technique, that
focuses on understanding how the code behaves at runtime.&lt;/p&gt;
&lt;p&gt;This dynamic evaluation is useful when the code reviewer is puzzled by a certain part of the program,
or expects a bug. It allows us to understand the state of the program at various points of execution,
to track the sequence of function calls, and to observe changes in variable states over time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Allows the review to see how the system behaves at runtime.&lt;/li&gt;
&lt;li&gt;Effective during diagnosing or evaluating “potential” bugs and problems.&lt;/li&gt;
&lt;li&gt;Helps build a mental model of the code, thus helpful if the reviewer is unfamiliar with the system.&lt;/li&gt;
&lt;li&gt;Can help catch side effects or anomalies that cannot be found during a static inspection.&lt;/li&gt;
&lt;li&gt;Suitable for detecting performance problems.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Setting up the reviewer’s system to run the code might be cumbersome and time-intensive.&lt;/li&gt;
&lt;li&gt;Might distract the reviewer from actually reviewing the source code.&lt;/li&gt;
&lt;li&gt;The review is limited to the scenarios the reviewer traces.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Academic Code Reading Techniques&lt;/h2&gt;
&lt;p&gt;Code review techniques described in academic papers aim at making code reviews more systematic.
Those approaches detail exactly where a reviewer should look, the order of
inspection, and also which questions to ask and issues to look for.&lt;/p&gt;
&lt;p&gt;I summarize the approaches into two types (abstract-driven and functionality-driven) and
only highlight aspects that help us to better design our own code reading and reviewing approaches.&lt;/p&gt;
&lt;!-- If you want to learn more about those [concrete techniques read on here](/code-reading/academic-code-reading-techniques/).--&gt;
&lt;h3 id=&quot;abstract&quot;&gt;9. Abstract-Driven Code Reviews&lt;/h3&gt;
&lt;p&gt;During abstract-driven code reading, the code reviewers read small pieces of code, and write down their understanding of the
code (aka create descriptions or specifications).
Then, the reviewers compare the description they created with the existing specification
or documentation of the code. If there was a mismatch, they found a problem. To determine the order in which methods or functions are
reviewed, academic approaches often use dependency information. Commonly, the reviewers are instructed to start with the
methods that have the least dependencies on the other parts of the systems. This is in line with the &lt;a href=&quot;#bottom&quot;&gt;bottom-up code review style&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;functionality&quot;&gt;10. Functionality or Use-Case-Driven Code Reviews&lt;/h3&gt;
&lt;p&gt;Another distinct set of reading techniques does not focus so much on the entities of the system (as described before),
but rather on concrete use cases or functionality of the system.
Here the aim is to check whether the code &lt;em&gt;behaves&lt;/em&gt; correctly.
For that, the reviewer first has to define use cases, and then inspect if the code implements the use cases correctly.
This includes designing the preconditions for the use case, the success and failure conditions,
and the exceptions.
This approach reminds us of systematic testing approaches, whereby here the focus is on statically inspecting the code using
&lt;a href=&quot;#control-flow&quot;&gt;control-flow&lt;/a&gt; and &lt;a href=&quot;#data-flow&quot;&gt;data-flow reading techniques&lt;/a&gt;, and not on the dynamic execution of the codebase.&lt;/p&gt;
&lt;p&gt;Want to learn more about the presented code review techniques and see them in action?
Have a look at my member-only articles on &lt;a href=&quot;/code-reading/test-driven-code-review/&quot;&gt;code review techniques here&lt;/a&gt;, or sign up for a free
remote learning session.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “10 Best Code Review Techniques”: &lt;a href=&quot;https://www.awesomecodereviews.com/code-reading/code-review-techniques/&quot;&gt;https://www.awesomecodereviews.com/code-reading/code-review-techniques/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2024-05-02T09:59:30+01:00&quot;&gt;May 02, 2024&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Test-Driven Code Reviews]]></title><description><![CDATA[Test-driven code review refers to code reviews in which tests are reviewed first.
Thus the difference to ad-hoc code reviewing is mainly the…]]></description><link>https://www.awesomecodereviews.com/code-reading/test-driven-code-review/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/code-reading/test-driven-code-review/</guid><pubDate>Fri, 19 Apr 2024 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Test-driven code review refers to code reviews in which tests are reviewed first.
Thus the difference to &lt;em&gt;ad-hoc&lt;/em&gt; code reviewing is mainly the order in which files, functions and methods are examined.&lt;/p&gt;
&lt;p&gt;One of the first mentions of
&lt;a href=&quot;https://testing.googleblog.com/2010/08/test-driven-code-review.html&quot;&gt;test-driven code review was on Google’s testing blog&lt;/a&gt;.
Since then, the idea of reading tests first during code reviews has
also been &lt;a href=&quot;https://fpalomba.github.io/pdf/Conferencs/C37.pdf&quot;&gt;empirically validated&lt;/a&gt;.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;This article covers the following topics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#more-bugs&quot;&gt;Use Test-driven reviews to find more bugs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#fewer-maintainability&quot;&gt;Fewer maintainability issues are reported&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#standalone-test-review&quot;&gt;Benefits of reviewing tests standalone&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#less-important&quot;&gt;Tests are perceived as less important&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#high-quality-tests&quot;&gt;The value of high-quality test suites&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#review-approach&quot;&gt;How to perform a test-driven code review?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#code-example&quot;&gt;Code example: Calculator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#reviewing-calculator&quot;&gt;Reviewing calculator in a test-driven way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#review-variation&quot;&gt;Variation of test-driven code reviews&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#lessons-learned&quot;&gt;Lessons learned: Review order matters and review intent is key&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br/&gt;
&lt;hr&gt;
&lt;p&gt;Are you ready to learn more? Then sign-up, or log-in: It’s free.&lt;/p&gt;
&lt;hr&gt;
&lt;br/&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Test-Driven Code Reviews”: &lt;a href=&quot;https://www.awesomecodereviews.com/code-reading/test-driven-code-review/&quot;&gt;https://www.awesomecodereviews.com/code-reading/test-driven-code-review/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2024-04-19T09:59:30+01:00&quot;&gt;April 19, 2024&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Top-Down Code Review]]></title><description><![CDATA[During a top-down code review, the reviewer begins by looking at the high-level artifacts of the system, such as ticket description…]]></description><link>https://www.awesomecodereviews.com/code-reading/top-down-code-review/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/code-reading/top-down-code-review/</guid><pubDate>Mon, 29 Jan 2024 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;During a top-down code review, the reviewer begins by looking at the high-level artifacts of the system, such as ticket description, architecture diagrams or documentation. Then, they progressively drill down into more detailed aspects of the code.&lt;/p&gt;
&lt;p&gt;Most developers nowadays start with a top-down approach, by first reading the code review description (aka. the pull request summary), or the related ticket or user story, before they
start to examine the code.&lt;/p&gt;
&lt;p&gt;This article covers the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#top-down-review&quot;&gt;When should I use a top-down code review approach?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#artifacts&quot;&gt;Top-down code review artifacts&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#pr-description&quot;&gt;PR description&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#code&quot;&gt;Python code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#guide-top-down&quot;&gt;Step-by-step guide on how to review code top-down&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#high-level-info&quot;&gt;1. Start with high-level information&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#overall-structure&quot;&gt;2. Understand the overall code structure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#flow&quot;&gt;3. Understand the flow of the program:&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#high-level-concepts&quot;&gt;4. Consider high-level concepts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#details&quot;&gt;5. Getting into the implementation details&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#other-techniques&quot;&gt;6. Optional: Completing the review by using other code review approaches&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#summary&quot;&gt;Summary: Top-down code review&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br/&gt;
&lt;hr&gt;
&lt;p&gt;Are you ready to learn more? Then sign-up, or log-in: It’s free.&lt;/p&gt;
&lt;hr&gt;
&lt;br/&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Top-Down Code Review”: &lt;a href=&quot;https://www.awesomecodereviews.com/code-reading/top-down-code-review/&quot;&gt;https://www.awesomecodereviews.com/code-reading/top-down-code-review/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2024-01-30T09:59:30+01:00&quot;&gt;January 30, 2024&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Developer Experience: Does it Matter?]]></title><description><![CDATA[Over the last few years, more and more developers and researchers look at developer experience, that is how developers
think about, feel…]]></description><link>https://www.awesomecodereviews.com/devex/developer-experience-impact/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/devex/developer-experience-impact/</guid><pubDate>Fri, 19 Jan 2024 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Over the last few years, more and more developers and researchers look at developer experience, that is how developers
think about, feel about, and value their work. This is important because for example friction that developers experience
through cumbersome tools, or processes and policies that get into their way, reduce developer experience drastically, and arguable lead to a loss of
productivity.&lt;/p&gt;
&lt;p&gt;But is that so? Does developer experience have an impact on performance, productivity and even for on the ability of an organization to meet its goals?&lt;/p&gt;
&lt;p&gt;In a recent study, we investigated exactly this question and shed light on whether measuring and improving DevEx is important for outcomes related to developers themselves (individuals), their teams, and their organization. Let me summarize the paper for you, or &lt;a href=&quot;https://queue.acm.org/detail.cfm?id=3639443&quot;&gt;read the full version here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Friction in a developer’s day is abundant&lt;/h2&gt;
&lt;p&gt;Software developer faces numerous distractions and unclear tasks on an ongoing basis: Long-turn around times for code reviews,
flaky test that fail the pipeline, unclear ticket description. All those problems are well-known by many developers and lead to frustration and inefficiency.
Yet even larger issue in the development lifecycle that lead to inefficiencies and fill a developers day with unnecessary obstacles, are often overlooked by upper management.&lt;/p&gt;
&lt;h2&gt;Management struggles to grasp DevEx&lt;/h2&gt;
&lt;p&gt;Developer experience (DevEx) is a direct concept that allows to detect, measure, discuss and improve such problems in the software development lifecycle.
Yet, despite its importance, DevEx faces skepticism from some business stakeholders, and developers and developer experience or platform teams often struggles
to get management to commit to improving DevEx.
Especially management that isn’t that familiar or involved with programming and the problems developers face asks whether DevEx is crucial and a must for investment, or if it is just a nice to have, that can be ignored.&lt;/p&gt;
&lt;h2&gt;Quantifying DevEx Outcomes&lt;/h2&gt;
&lt;p&gt;Thus, in this research we investigate outcomes of DevEx on individual, team, and organizational dimensions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Developer Outcomes: These include job performance, creativity, and learning, with the premise that improved work design leads to better outcomes for individual developers.&lt;/li&gt;
&lt;li&gt;Team Outcomes: Focused on the quality of the system the team works in, including aspects like code quality and technical debt.&lt;/li&gt;
&lt;li&gt;Organization Outcomes: These outcomes include retention, innovation, profitability, and the organization’s ability to meet its goals.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Model of DevEx&lt;/h2&gt;
&lt;p&gt;For this study, we introduce a model for understanding and measuring DevEx, that follows closely the framework we introduced in our &lt;a href=&quot;/devex/developer-experience-acm/&quot;&gt;earlier work here&lt;/a&gt;.
It conceptualized DevEx through three dimensions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Flow State: Refers to a mental state of deep immersion and focus in work.&lt;/li&gt;
&lt;li&gt;Feedback Loops: The speed and quality of information in a system used as input to another part.&lt;/li&gt;
&lt;li&gt;Cognitive Load: The amount of mental processing required for a developer to complete a task.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;DevEx makes an Impact&lt;/h2&gt;
&lt;p&gt;Our study presents evidence that improving DevEx has positive outcomes not just for developers but also for teams and organizations.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Developers who have a significant amount of time for deep work feel 50 percent more productive compared with those lacking in dedicated focus time.&lt;/li&gt;
&lt;li&gt;When developers feel engaged, they also feel they are 30 percent more productive, compared with developers who find their work boring.&lt;/li&gt;
&lt;li&gt;If the code is understandable developers feel 42 percent more productive than developers that indicate their code base is hard to understand.&lt;/li&gt;
&lt;li&gt;Developers who find their tools and work processes intuitive and easy to use feel they are 50 percent more innovative compared with those with opaque or hard-to-understand processes.&lt;/li&gt;
&lt;li&gt;Developers who report fast code-review turnaround times feel 20 percent more innovative compared with developers who report slow turnaround times.&lt;/li&gt;
&lt;li&gt;Tight feedback loops have another positive outcome. Teams that provide fast responses to developers’ questions report 50 percent less technical debt than teams whose responses are slow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Where to go from here&lt;/h2&gt;
&lt;p&gt;It emphasizes the need for organizations to understand and invest in DevEx.&lt;/p&gt;
&lt;p&gt;Concrete steps for advocating such DevEx investment include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;collecting data on the current DevEx,&lt;/li&gt;
&lt;li&gt;setting goals based on this data,&lt;/li&gt;
&lt;li&gt;preparing teams for success, sharing progress, and continuously revisiting and refining the approach.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To read the complete study, please &lt;a href=&quot;https://queue.acm.org/detail.cfm?id=3639443&quot;&gt;visit the ACM website here&lt;/a&gt;.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Developer Experience: Does it Matter?”: &lt;a href=&quot;https://www.awesomecodereviews.com/devex/developer-experience-impact/&quot;&gt;https://www.awesomecodereviews.com/devex/developer-experience-impact/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2024-01-19T09:59:30+01:00&quot;&gt;January 19, 2024&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Developer Experience: What Drives Productivity?]]></title><description><![CDATA[Engineering leaders have long sought to improve the productivity of their developers, but knowing how to measure or even define developer…]]></description><link>https://www.awesomecodereviews.com/devex/developer-experience-acm/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/devex/developer-experience-acm/</guid><pubDate>Mon, 18 Dec 2023 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Engineering leaders have long sought to improve the productivity of their developers, but knowing how to measure or even define developer productivity has remained elusive.
Past approaches, such as measuring the output of developers or the time it takes them to complete tasks, have failed to account for the complex and diverse activities that developers perform.
Thus, the question remains: What should leaders measure and focus on to improve developer productivity?&lt;/p&gt;
&lt;p&gt;Today, many organizations aiming to improve developer productivity are finding that a new developer-centric approach focused on developer experience (also known as DevEx) unlocks valuable insights and opportunities.
Gartner Inc. reports that 78 percent of surveyed organizations have a formal DevEx initiative either established or planned.
Accordingly, there has been a continued rise in dedicated DevEx and platform teams being formed to help improve developer experience within their organizations.&lt;/p&gt;
&lt;p&gt;Developer experience focuses on the lived experience of developers and the points of friction they encounter in their everyday work.
In addition to improving productivity, DevEx drives business performance through increased efficiency, product quality, and employee retention.
A 2020 McKinsey study found that companies with better work environments for their developers achieved revenue growth four to five times greater than that of their competitors.&lt;/p&gt;
&lt;p&gt;This paper provides a practical framework for understanding DevEx, and presents a measurement framework that combines feedback from developers with data about the engineering systems they interact with.
These two frameworks provide leaders with clear, actionable insights into what to measure and where to focus in order to improve developer productivity.&lt;/p&gt;
&lt;p&gt;Continue Reding this article on &lt;a href=&quot;https://queue.acm.org/detail.cfm?id=3595878&quot;&gt;ACM&lt;/a&gt; or download it as &lt;a href=&quot;https://dl.acm.org/doi/pdf/10.1145/3595878&quot;&gt;PDF&lt;/a&gt;.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Developer Experience: What Drives Productivity?”: &lt;a href=&quot;https://www.awesomecodereviews.com/devex/developer-experience-acm/&quot;&gt;https://www.awesomecodereviews.com/devex/developer-experience-acm/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-12-18T09:59:30+01:00&quot;&gt;December 18, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[What is Developer Experience (DevEx)?]]></title><description><![CDATA[Over the last two years, I have been investigating developer experience - that is, how developers experience their work and how that…]]></description><link>https://www.awesomecodereviews.com/devex/introduction/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/devex/introduction/</guid><pubDate>Mon, 18 Dec 2023 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Over the last two years, I have been investigating developer experience - that is, how developers experience their work and how that influences outcomes such as productivity, code quality, or retention.&lt;/p&gt;
&lt;p&gt;In our first in-depth study, we look at which factors influence developer experience.
We found 25 factors that developers regularly described when they talked about developer experience and grouped them into 4 categories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Development and release&lt;/li&gt;
&lt;li&gt;Product management&lt;/li&gt;
&lt;li&gt;Collaboration and culture&lt;/li&gt;
&lt;li&gt;Developer flow and fulfillment&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We also identified how developer experience can be improved and which strategies developers have to improve it, as well as which challenges and barriers they face when they try to improve DevX.&lt;/p&gt;
&lt;h2&gt;Developers started to talk about DevX&lt;/h2&gt;
&lt;p&gt;Our research was published in mid-2022 (you can &lt;a href=&quot;https://arxiv.org/abs/2205.06352&quot;&gt;download the full paper here&lt;/a&gt;), and since then, a lot of people in the industry have started to talk about developer experience. This is awesome!&lt;/p&gt;
&lt;p&gt;Developers all around the world could relate to our findings and echoed that they indeed need good developer experience to be productive and ship high-quality code. Developers know that they need time to focus and do deep work. They know about flow state and how fast code review turnaround times are a game changer.&lt;/p&gt;
&lt;h2&gt;DevX drives productivity&lt;/h2&gt;
&lt;p&gt;In a recent article, we &lt;a href=&quot;/devex/developer-experience-acm/&quot;&gt;published on ACM&lt;/a&gt;, we talked about how developer experience can be described with three dimensions.
Those dimensions are &lt;em&gt;flow state&lt;/em&gt;, &lt;em&gt;feedback loops&lt;/em&gt;, and &lt;em&gt;cognitive load&lt;/em&gt;.
In this article, we also briefly highlight how to measure DevEx, and give example metrics that cover all three dimensions.
We also cover case studies from companies we worked with, such as eBay, and Pfizer to demonstrate how they use metrics to understand their internal developer experience.&lt;/p&gt;
&lt;h2&gt;DevX? No buy-in from management&lt;/h2&gt;
&lt;p&gt;But while developers quickly grasped the importance of developer experience, business folks were too far away from programming to understand the significance DevX has on business outcomes.
The fact is that many companies are only willing to spend money on DevX during “good“ times — when we have too much time, too much money, and no other priorities. Well, those times do not exist, especially not with a bad DevX.&lt;/p&gt;
&lt;p&gt;When talking to engineering leaders, we realized that what is missing is data that quantifies the impact of DevX. That’s why we have worked on getting this data over the last year. Data that shows the impact of DevX on productivity, code quality, retention, innovation - well, all the outcomes that business cares about.&lt;/p&gt;
&lt;h2&gt;Hard numbers to convince business&lt;/h2&gt;
&lt;p&gt;Our research article will be published soon. The research goal was to quantify DevX’s impact on developers, teams, and organizations. The picture below highlights how improvements to the flow state of developers, their cognitive load, and the feedback loops they encounter have a direct and quantifiable impact.&lt;/p&gt;
&lt;h2&gt;Code Review Related DevX&lt;/h2&gt;
&lt;p&gt;Another interesting outcome of this study is that we could show that a smooth code review process impacts productivity, retention, and learning. As you see in the quote below, code reviews also impact innovation.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A fast code review turnaround time leads to a 20% increase in innovation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If we think about it, it makes sense. Innovation suffers if we have to wait a long time to get feedback on our work or if releasing new features is painful.&lt;/p&gt;
&lt;h2&gt;How to Improve Code Review Turnaround Times&lt;/h2&gt;
&lt;p&gt;But which strategies help to increase turn-around times? Well, that depends on the underlying root cause for the slow feedback. But have a look at the code review best practices to find some universal strategies to improve your code review practice.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “What is Developer Experience (DevEx)?”: &lt;a href=&quot;https://www.awesomecodereviews.com/devex/introduction/&quot;&gt;https://www.awesomecodereviews.com/devex/introduction/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-12-18T09:59:30+01:00&quot;&gt;December 18, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Code Review Challenges That Slow Your Team Down]]></title><description><![CDATA[Many teams face challenges when conducting code reviews.
In this article, we will look at the most common and problematic code review…]]></description><link>https://www.awesomecodereviews.com/fundamentals/challenges/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/fundamentals/challenges/</guid><pubDate>Sat, 29 Jul 2023 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Many teams face challenges when conducting code reviews.
In this article, we will look at the most common and problematic code review challenges and also outline how to overcome those.&lt;/p&gt;
&lt;p&gt;Code review is an engineering practice used by many high-performing teams.
And even though this software practice has many advantages, teams regularly face problems doing code reviews that slow down software development.&lt;/p&gt;
&lt;p&gt;Knowing which problems arise during code review can help you to ensure a productive and effective code review experience. The code review challenges presented in this article are based on a &lt;a href=&quot;../../downloads/research/code-reviewing-in-the-trenches.pdf&quot;&gt;survey we conducted at Microsoft with over 900 participants&lt;/a&gt; and on my years-long experience giving &lt;a href=&quot;/workshops/&quot;&gt;code review workshops&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;A typical code review process&lt;/h2&gt;
&lt;p&gt;A typical tool-based code review process looks roughly like this:&lt;/p&gt;
&lt;p&gt;Once a developer has finished a piece of code, she prepares the code for being submitted for review. Then, she selects reviewers who should review this code change. The reviewers then inspect the code and give feedback. The author of the code looks through the feedback and improves and changes the code if need be. Once everybody is satisfied, or an agreement is reached, the code can be checked into the common code base.&lt;br&gt;
In another post, I described what &lt;a href=&quot;/code-reviews-at-microsoft/&quot;&gt;a typical code review process looks like at Microsoft.&lt;/a&gt; And here, I describe how &lt;a href=&quot;/code-reviews-at-google/&quot;&gt;Google reviews code&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Code reviewing isn’t always a smooth process&lt;/h2&gt;
&lt;p&gt;These steps read like a smooth process. But, like everything, things are more complicated than expected. There are quite a few code review challenges that can reduce the positive experience with code reviews for the entire team and take a toll on the team’s productivity. So, let’s have a look at the difficulties and challenges of code reviews.&lt;/p&gt;
&lt;p&gt;The biggest code review pitfalls are about the &lt;em&gt;time spent on code reviews&lt;/em&gt; and the &lt;em&gt;value code reviews provide&lt;/em&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Code reviews are only effective, valuable and fun, if you receive feedback in a timely manner. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=Code%20reviews%20are%20only%20effective%2C%20valuable%20and%20fun%2C%20if%20you%20receive%20feedback%20in%20a%20timely%20manner.&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Waiting for code review feedback&lt;/h2&gt;
&lt;p&gt;One of the most frustrating problems during code reviews is waiting for code review feedback. Code reviews are only fun, effective, and valuable if you receive feedback in a timely manner. Waiting for the code review feedback to come in means that you are not able to work on the code in the meanwhile. So you either spend your time scrolling through Twitter, or you have to do a context switch and work on another task. Both can be a huge problem. Even though developers can pick up other tasks to work on, if the code review takes too long, it impacts the developer’s productivity and also the developer’s satisfaction.&lt;/p&gt;
&lt;p&gt;But why does the code review feedback take so long?&lt;/p&gt;
&lt;h2&gt;Code reviews are a “necessary evil”&lt;/h2&gt;
&lt;p&gt;Code review is not the only task the developers have to perform. Even worse, in most companies and teams, developers’ main task is to write code, not to review code. This means that code review has a lower priority to developers than working on features. Depending on the incentives and how different tasks are valued in a team, code review might come even behind writing tests or attending meetings. In fact, at several companies, code reviews are seen as a “necessary evil”.&lt;/p&gt;
&lt;p&gt;In addition, code review can take a significant amount of time in a developer’s day-to-day work. So, it is likely that the code reviewer is engaged in other activities and has to stop or finish those first before looking at the code review.&lt;/p&gt;
&lt;p&gt;If the timing is not ideal, and especially if the code reviewer hasn’t expected this change to come along, chances are it will take a while before she looks at the review. Remote teams also have to be aware of time zone differences. Otherwise, code reviews might even take longer.&lt;/p&gt;
&lt;h2&gt;Code reviews are not counted as actual work&lt;/h2&gt;
&lt;p&gt;Time constraints are real, and they affect both the code reviewer and the author of the code. Doing a proper code review takes time. If teams want developers to do code reviews but do not value or count the time developers spend on code reviews, this becomes a real problem.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1024px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/f4b08fc08b795ffbb3091ab1b61cb069/2bef9/Code-Review-value-time.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 50%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAA7EAAAOxAGVKw4bAAACV0lEQVQoz02PS08TURiG5xcoRilSBu0FqMRLorg1uHDDQn+bkYXoD1CJBgxGg9yEpohIKbe20xu9TmfmzI1SG9C4eMwcNi6e857vfG++93zKWCxKVivhnfaotwXVpkHv91/evH3HtcuXUK8PMDQQutBQPxF1iPHRERLxGIlYlFvxuKxjqkokHEZJxGJo5Sq23yVbaUrc0x5z8wuErvRxY3BQGm+GBxm8dpXxkTjPpqZ48njygslJnk5NkYjGUEMhlEQ8zmGugNvpsZ7aZi25hel2ePN2lv6+y0SHVdSBEKORCBP37vHg7h1uj40yFo0QH1aJqWFG1DD3xxM8ejiB8vnTJ1qmkCtnKw0OijUM4ZHNF5h7/56X09N8mJ3l4/wcSytLrKyskUx9J53OsJc5YDe9T3onw/5+Fk0ro+Qz2wjHkz90Tn6hCw/hnyJcj1azxcyL5xzuZdhY+crytyQbqR98Wd5g5yBPsaaze1RgffMni6tJFhZXUQ520+iGiXf6C8fvYPsd3E4XwxLU6w1ez7wildpkM5lkeWOLI61MoVIjX65RrLYo1XQq9TbVpslxw0AxTIHt+nLY/wjbxWib6G0DXTfQ2yaVWoNqvUm91UY3BKZwJZbtYQoHw7JRPMdBmCaubUu1LQtD12VtGQbtVgvfdaUGXtsSEt/zEJYle61GQ/p/n52h9LpdHCEoFQrUq1WpWi5H7fiYcrGIls9faC4n+0VNk/dgSKVUopDPy+Bgzp/zc5TgCAjSg7SO70tOPE9q8B6kB6FBP9CgDnrdTudiO8eR/oB/7eZyzo+lxpQAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;You have to value and plan for the time spent doing code reviews&quot;
        title=&quot;You have to value and plan for the time spent doing code reviews&quot;
        src=&quot;/static/f4b08fc08b795ffbb3091ab1b61cb069/2bef9/Code-Review-value-time.png&quot;
        srcset=&quot;/static/f4b08fc08b795ffbb3091ab1b61cb069/5a46d/Code-Review-value-time.png 300w,
/static/f4b08fc08b795ffbb3091ab1b61cb069/0a47e/Code-Review-value-time.png 600w,
/static/f4b08fc08b795ffbb3091ab1b61cb069/2bef9/Code-Review-value-time.png 1024w&quot;
        sizes=&quot;(max-width: 1024px) 100vw, 1024px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You can’t expect quality code reviews if you don’t value the time a developer spends on them. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=You%20can%27t%20expect%20quality%20code%20reviews%20if%20you%20don%27t%20value%20the%20time%20a%20developer%20spends%20on%20them.&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Doing code reviews is not rewarded&lt;/h2&gt;
&lt;p&gt;It does not help to claim to value code reviews if you do not reward the effort developers spend on this task. Many companies focus on rewarding developers for the amount of code they write or the features they develop. This decreases the motivation and the ability of developers to do a good job helping each other (which includes code reviewing). Code review performance should be a cornerstone for performance evaluation or promotion decisions.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you want your team to do code reviews well, reward them for their work. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=If%20you%20want%20your%20team%20to%20do%20code%20reviews%20well%2C%20reward%20them%20for%20their%20work.%20&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Missing guidelines on code reviews&lt;/h2&gt;
&lt;p&gt;Another code review challenge is missing guidelines or training on how to do code reviews. If developers have no clear idea of what is expected from them during a code review, they also might procrastinate on doing code reviews. This increases the time spends waiting on review feedback. In addition, it reduces the value of the feedback because developers have no clear instructions on what to look for. &lt;a href=&quot;/workshops/&quot;&gt;Training on code reviews&lt;/a&gt;, which creates a shared understanding of the goals of code reviews, and how to do them, helps to overcome this challenge. In addition, teams can use &lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;code review checklists&lt;/a&gt; to guide developers through code reviews and make code review more systematic and effective.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I’m expected to participate, but I’m not quite sure how. I’ll wait until someone else starts.&lt;/p&gt;
&lt;p&gt;&lt;cite&gt;(study participant)&lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Large reviews are hard to review&lt;/h2&gt;
&lt;p&gt;Large code changes, that span several files and consist of more than 400 lines of code create another significant code review challenge. Imagine you are the reviewer, and you just got a code review request. You think: “I am quickly going to look at that”. But once you open the review, you see this large code change. Several files have been changed, and all changes tangle throughout the code base. What’s your first reaction?&lt;/p&gt;
&lt;p&gt;Probably: holy cow!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;10 lines of code = 10 issues.&lt;/p&gt;
&lt;p&gt;500 lines of code = “looks fine.”&lt;/p&gt;
&lt;p&gt;Code reviews.&lt;/p&gt;
&lt;p&gt;— I Am Devloper (@iamdevloper) &lt;a href=&quot;https://twitter.com/iamdevloper/status/397664295875805184?ref_src=twsrc%5Etfw&quot;&gt;November 5, 2013&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That’s right. That is exactly what we saw when analyzing thousands of code reviews. Not only does review time increase with the size of the code change, but also feedback quality decreases. Well, that’s probably understandable. Large code changes are incredibly difficult to review.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Large code reviews are hard to review. The quality of the review decreases with the size of the change, thus limiting the value teams get out of from code reviews. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=Large%20code%20reviews%20are%20hard%20to%20review.%20The%20quality%20of%20the%20review%20decreases%20with%20the%20size%20of%20the%20change%2C%20thus%20limiting%20the%20value%20teams%20get%20out%20of%20from%20code%20reviews.%20&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Reviewer is unfamiliar with codebase or technology&lt;/h2&gt;
&lt;p&gt;If, in addition, the code reviewers are not that familiar with the part of the code base the change took place in, reviewing can quickly become a nightmare. Similarly, if the reviewers are new to the technology or programming language, reviews are challenging for the reviewers. Do not expect developers that haven’t seen this piece of code before to make significant improvements.&lt;/p&gt;
&lt;h2&gt;No description of the code change is given&lt;/h2&gt;
&lt;p&gt;Understanding code changes, and especially the motivation for a code change is another code review challenge many reviewers &lt;g class=&quot;gr_ gr_6 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace&quot; data-gr-id=&quot;6&quot; id=&quot;6&quot;&gt;face&lt;/g&gt;. If there is no description explaining the purpose of the change, code reviewing becomes much harder. We saw in the study that if the code reviewer does not understand the code change, or if she is overwhelmed by the amount of change, she cannot give insightful feedback.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It’s just this big incomprehensible mess… then you can’t big,add any value because they are just going to explain it to you and you’re going to parrot back what they say.&lt;/p&gt;
&lt;p&gt;&lt;cite&gt;interviewed developer13&lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Not getting valuable feedback&lt;/h2&gt;
&lt;p&gt;Without a doubt, spending time on code reviews and not getting useful feedback back, is a problem. Even though the team might still benefit from the knowledge transfer, the developer’s motivation to send their code for review decreases when they do not get valuable feedback.&lt;/p&gt;
&lt;p&gt;There are several reasons why reviewers do not or can’t give insightful feedback. It can be that the code reviewer did not have the right expertise. Another common reason is that the reviewer did not have enough time to look thoroughly through the change.&lt;br&gt;
Maybe the code reviewer does not understand the code. It can also be that the code reviewer does not know what issues to look for. &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/devops/learn/devops-at-microsoft/boosting-code-reviews-useful-comments&quot;&gt;Understanding what makes for valuable code review feedback&lt;/a&gt;, using a &lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;code review checklist&lt;/a&gt;, and implementing &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practices&lt;/a&gt; help to make sure the code author gets valuable feedback back.&lt;/p&gt;
&lt;h2&gt;Focusing on stylistic issues&lt;/h2&gt;
&lt;p&gt;Another problem that can happen during a code review is called bikeshedding. Bikeshedding means that developers focus on smaller issues and start disputing minor problems and overlook the serious ones. The reasons for that are manifold. Common behind-the-scenes challenges that lead to bikeshedding are that developers do not understand the code change or that they do not have enough time for the code reviews. Sometimes bikeshedding can be a sign that there are issues with the team dynamics.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If people dispute about minor issues during code reviews, take a look at the underlying issue. Time pressure, too large reviews, rivalry? &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=If%20people%20dispute%20about%20minor%20issues%20during%20code%20reviews%2C%20take%20a%20look%20at%20the%20underlying%20issue.%20Time%20pressure%2C%20too%20large%20reviews%2C%20rivalry%3F%20&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Reaching consensus&lt;/h2&gt;
&lt;p&gt;Sometimes it is hard to reach a consensus. This can occur between code reviewers and the code author, or also between several code reviewers directly. Such situations must be handled carefully as team dynamics are closely connected to these happenings. Communication via tools and in written form can aggravate this problem. If there seems to be any tension, or contentious issues to discuss, switching to face-to-face (either in person or via a video call) might be a good idea.&lt;/p&gt;
&lt;h2&gt;The benefits of code review outweigh the effort&lt;/h2&gt;
&lt;p&gt;I hope this list of code review challenges did not change your mind about code reviews. Because, the good news is that if you are aware of the problems during code review and take precautions, code reviews are a very beneficial engineering technique. And, there are even more proven ways to work effectively with code reviews.&lt;/p&gt;
&lt;p&gt;So, keep reading more about code reviews, for example about &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practices&lt;/a&gt; to overcome the code review challenges and ensure your team gets the best out of the code review practice.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Code Review Challenges That Slow Your Team Down”: &lt;a href=&quot;https://www.michaelagreiler.com/code-review-pitfalls-slow-down/&quot;&gt;https://www.michaelagreiler.com/code-review-pitfalls-slow-down/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-01-17T09:59:30+01:00&quot;&gt;January 17, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Specific Code Review Checklists]]></title><description><![CDATA[Code review checklists make code reviews more systematic and help detect more issues.
They also help teams to perform code reviews more…]]></description><link>https://www.awesomecodereviews.com/checklists/topic-based-code-review-checklists/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/checklists/topic-based-code-review-checklists/</guid><pubDate>Sun, 26 Feb 2023 22:40:32 GMT</pubDate><content:encoded>&lt;p&gt;Code review checklists make code reviews more systematic and help detect more issues.
They also help teams to perform code reviews more consistently among team members.&lt;/p&gt;
&lt;p&gt;Yet, there is no one size fits all code review checklist. Instead, the best code review checklist is specific
to your technology, domain and to what you want to check the code for.
This means it’s best to tailor code review checklists to your needs.&lt;/p&gt;
&lt;p&gt;In the remainder of this article, you find code review checklists that focus on different areas, like security or accessibility,
or different technologies, such as Java or C.
You can use those code review checklists for inspiration and derive your own one based on those example code review checklists.&lt;/p&gt;
&lt;h2&gt;General Code Review Checklists&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;General Code Review Checklist&lt;/a&gt;: This list covers all relevant aspects from implementation, to readability and security.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.evoketechnologies.com/blog/code-review-checklist-perform-effective-code-reviews/&quot;&gt;Short Code Review Checklist&lt;/a&gt; by Suremder Reddy Gutha: Short code review list with nice visualization.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Company Code Review Checklists&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://static1.squarespace.com/static/56ab961ecbced617ccd2461e/t/5d39b9a65283fc0001e995b8/1564064166997/Squarespace+Code+Review+Checklist.pdf&quot;&gt;Squarespace Code Review Checklist&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Security Related Code Review Checklists&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/checklists/secure-code-review-checklist/&quot;&gt;Security-focused code review checklist&lt;/a&gt;: A good balanced code review checklist that covers all relevant topics of the OWASP top 10, such as input validation, authorization or session management.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/0xRadi/OWASP-Web-Checklist&quot;&gt;OWASP Web Application Security Testing Checklist&lt;/a&gt;: A web application checklist by OWASP&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://courses.cs.washington.edu/courses/cse403/10wi/lectures/security_audit_checklist.pdf&quot;&gt;Security Audit Checklist: Code Perspective from University of Washington&lt;/a&gt;: General tips from two perspectives: Programmer and Attacker. Also tips specific to Ruby/Java/JSP/PHP&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/softwaresecured/secure-code-review-checklist&quot;&gt;Secure Code Review Checklist&lt;/a&gt;: Modelled after OWASP.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Java Code Review Checklists&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.java-success.com/30-java-code-review-checklist-items/&quot;&gt;30+ items for Reviewing Java Code&lt;/a&gt;: A checklist with concrete examples, covering aspects relevant to object-oriented programming.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://dzone.com/articles/java-code-review-checklist&quot;&gt;Java Code Review Checklist from DZone&lt;/a&gt;: Concrete list for Java.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/code-review-checklists/java-concurrency&quot;&gt;Java Concurrency Checklist&lt;/a&gt;: An in-depth resource dedicated to Java concurrency best practices.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;JavaScript Code Review Checklists&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://google.github.io/styleguide/jsguide.html&quot;&gt;Google’s JavaScript Guideline&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/airbnb/javascript&quot;&gt;AirBnB JavaScript Guidelines&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/itsallrelative/Javascript-Code-Review-Checklist&quot;&gt;Short JavaScript Checklist&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/kdsingharneja/the-javascript-code-review-checklist&quot;&gt;JavaScript Code Review Guideline including Frameworks such as Angular 1 &amp;#x26; JQuery&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;C# Code Review Checklists&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/samuelwill/csharp-code-review-checklist&quot;&gt;Short List of rules C# Code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;C++ Code Review Checklists&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/swomack/cpp-code-review-checklist&quot;&gt;Checklist referencing sources&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Python Code Review Checklists&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.python-guide.org/writing/style/&quot;&gt;Python Code Style with examples&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Pull Request Checklist&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/sapegin/frontend-pull-request-checklist&quot;&gt;Frontend pull request checklist&lt;/a&gt;: This a meta checklist that makes sure you have done all necessary checks before your frontend code goes through a pull request.&lt;/li&gt;
&lt;/ul&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Specific Code Review Checklists”: &lt;a href=&quot;https://www.awesomecodereviews.com/checklists/topic-based-code-review-checklists/&quot;&gt;https://www.awesomecodereviews.com/checklists/topic-based-code-review-checklists/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-02-26T22:40:32.169Z&quot;&gt;February 26, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Company Specific Code Review Practices]]></title><description><![CDATA[Over the years, I curated a list of articles that give insights into how companies like Facebook, Google, or Netlify review code.
On their…]]></description><link>https://www.awesomecodereviews.com/companies/company-specific-code-review-practices/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/companies/company-specific-code-review-practices/</guid><pubDate>Sun, 26 Feb 2023 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Over the years, I curated a list of articles that give insights into how companies like Facebook, Google, or Netlify review code.
On their engineering blogs, those companies share their code review values, or which tools they use. We also find
insights into how other companies incorporate static or dynamic analysis, or how they deal with the problem of nit-picking.&lt;/p&gt;
&lt;p&gt;In the following, you find summaries of the insights different companies share about their code review practices, as well as a link to the
complete article.&lt;/p&gt;
&lt;h2&gt;Auth0&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&quot;https://auth0.com/blog/conducting-effective-code-reviews/&quot;&gt;code review guide of Auth0 focuses&lt;/a&gt; on the automation aspects,
and also gives clear indications which quality criteria a
pull request must pass before it is reviewed manually.&lt;/p&gt;
&lt;h2&gt;BitCoin Core&lt;/h2&gt;
&lt;p&gt;This guide examples how newcomers can help in &lt;a href=&quot;https://jonatack.github.io/articles/how-to-review-pull-requests-in-bitcoin-core&quot;&gt;reviewing pull requests in the BitCoin Core project&lt;/a&gt; and has an emphasis on distinguishing between core issues and nitpicking.&lt;/p&gt;
&lt;h2&gt;Facebook&lt;/h2&gt;
&lt;p&gt;Facebook makes heavy use of static analysis tools. This researchy article goes into the details of how they &lt;a href=&quot;https://research.fb.com/publications/scaling-static-analyses-at-facebook/&quot;&gt;scaled static analysis at Facebook&lt;/a&gt; using tools such as Infer and Zoncolan,
and how to apply techniques similar to program verification in practice.&lt;/p&gt;
&lt;h2&gt;Gitlab&lt;/h2&gt;
&lt;p&gt;Gitlab’s engineers are very open about their desired engineering culture, their values, and how they do things. In this section of the Gitlab handbook, they
outline their &lt;a href=&quot;https://about.gitlab.com/handbook/engineering/workflow/reviewer-values/&quot;&gt;Code Review Values&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Google&lt;/h2&gt;
&lt;p&gt;Google’s main principle is enabling lightning-fast code reviews. How Googlers achieve a code review turn-around time of 4 hours,
and what their practice and policies are like are detailed in this article about &lt;a href=&quot;/code-reviews-at-google/&quot;&gt;code review at Google&lt;/a&gt;.
Google’s official &lt;a href=&quot;https://google.github.io/eng-practices/review/&quot;&gt;code review guidelines&lt;/a&gt; also state when they consider code good enough, or what to do when there is a conflict.&lt;/p&gt;
&lt;h2&gt;Microsoft&lt;/h2&gt;
&lt;p&gt;Microsoft does not have one way to do code reviews. Instead, teams or divisions review code depending on their specific needs, requirements, processes and constraints.
Yet, Microsoft developers have a few &lt;a href=&quot;/code-reviews-at-microsoft/&quot;&gt;best code review best practices&lt;/a&gt; that prove helpful
to enable fast and effective code reviews independent of the system developers work on or the engineering processes they employ.&lt;/p&gt;
&lt;h2&gt;Netlify&lt;/h2&gt;
&lt;p&gt;Netlify describes how they use specific words to indicate the &lt;a href=&quot;https://www.netlify.com/blog/2020/03/05/feedback-ladders-how-we-encode-code-reviews-at-netlify/&quot;&gt;severity of the issues raised during code reviews&lt;/a&gt;.
They use something they call the “feedback ladder”, which encodes severity in form of a “stone” metaphor.
In their case, “sand” for example would indicate a minor issue that you can or cannot address during code reviews, and
“rock” indicates a major issue you surely should work on.&lt;/p&gt;
&lt;h2&gt;Netflix&lt;/h2&gt;
&lt;p&gt;Netflix describes how they
&lt;a href=&quot;https://netflixtechblog.medium.com/improving-pull-request-confidence-for-the-netflix-tv-app-b85edb05eb65&quot;&gt;review tests and test outcomes during pull requests&lt;/a&gt;, as well as how they worked on
improving their confidence in test results.&lt;/p&gt;
&lt;h2&gt;New Relic&lt;/h2&gt;
&lt;p&gt;New Relic had a team with very experienced engineers that soon turned on each other during code reviews.
Passive-aggressive communication dominated the code reviews. After several people even left the team, they
decided to &lt;a href=&quot;https://blog.newrelic.com/engineering/code-review-guidelines/&quot;&gt;refine their code review process&lt;/a&gt;
from the ground up. They specified who is responsible for what, and
require the code reviewers to separate subjective and objective code review feedback by labeling it “blocking” or “non-blocking”.&lt;/p&gt;
&lt;h2&gt;Palantir&lt;/h2&gt;
&lt;p&gt;Palantir describes &lt;a href=&quot;https://medium.com/palantir/code-review-best-practices-19e02780015f&quot;&gt;how they do code reviews&lt;/a&gt;,
in a guide that explains why Palantir does code reviews, when they do code reviews, and
how they prepare and perform code for review, and also gives some code review examples.&lt;/p&gt;
&lt;h2&gt;Quora&lt;/h2&gt;
&lt;p&gt;Quora describes how they use &lt;a href=&quot;https://www.quora.com/q/quoraengineering/Moving-Fast-With-High-Code-Quality&quot;&gt;post-commit reviews to increase speed&lt;/a&gt;.
It’s common practice at Quora to push code without review (several times a day) to production.
The rule of thumb is that this code should be reviewed within one week,
but most of the code is reviewed within 1-2 days after it went live into the production system.&lt;/p&gt;
&lt;h2&gt;PayPal&lt;/h2&gt;
&lt;p&gt;PayPal developers outline their &lt;a href=&quot;https://medium.com/paypal-engineering/effective-code-reviews-53d62a203b2f&quot;&gt;take on code reviews&lt;/a&gt;.
The most interesting part of their guide is their focus on learning and mentoring. In fact, code reviews at PayPal are seen as
free career improvement training.&lt;/p&gt;
&lt;h2&gt;Plaid&lt;/h2&gt;
&lt;p&gt;At Plaid, the &lt;a href=&quot;https://plaid.com/blog/building-an-inclusive-code-review-culture/&quot;&gt;Code Review Culture&lt;/a&gt; aims to allow for learning and growth of all parties and ship healthy code.&lt;/p&gt;
&lt;h2&gt;Raycast&lt;/h2&gt;
&lt;p&gt;Raycast on the other hand describes how they &lt;a href=&quot;https://www.raycast.com/blog/no-code-reviews-by-default/&quot;&gt;do not do code reviews by default&lt;/a&gt;.
They think that pull requests lead to distrust in the team, and that the code author should take full responsibility for their changes.&lt;/p&gt;
&lt;h2&gt;Shoptify&lt;/h2&gt;
&lt;p&gt;Shopify describes how &lt;a href=&quot;https://shopify.engineering/great-code-reviews&quot;&gt;small, coherent pull requests&lt;/a&gt;
help them to not live in fear for several months.&lt;/p&gt;
&lt;h2&gt;Software Improvement Group&lt;/h2&gt;
&lt;p&gt;The Software Improvement Group also outlines how they use Gitlab &lt;a href=&quot;https://medium.com/softwareimprovementgroup/how-we-do-code-reviews-at-sig-6e5189fb1e6c&quot;&gt;to do code reviews&lt;/a&gt;, and which rules and policies they incorporate in their code review practice.&lt;/p&gt;
&lt;h2&gt;Squarespace&lt;/h2&gt;
&lt;p&gt;Squarespace published about their code review culture in a two parts blog article: &lt;a href=&quot;https://engineering.squarespace.com/blog/2019/code-review-culture-part-1&quot;&gt;Code Review Culture PartPart 1&lt;/a&gt; + &lt;a href=&quot;https://engineering.squarespace.com/blog/2019/code-review-culture-part-2&quot;&gt;Code Review Culture Part 2&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Contribute to this list&lt;/h2&gt;
&lt;p&gt;If you have an article you think should be added, please open a &lt;a href=&quot;https://github.com/mgreiler/all-about-code-review/&quot;&gt;PR here&lt;/a&gt;, or send it to me via email. Thanks.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Company Specific Code Review Practices”: &lt;a href=&quot;https://www.awesomecodereviews.com/companies/company-specific-code-review-practices/&quot;&gt;https://www.awesomecodereviews.com/companies/company-specific-code-review-practices/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-02-26T09:59:30+01:00&quot;&gt;February 26, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Automatic code review descriptions with "Whatthediff" code review tool]]></title><description><![CDATA[Whatthediff is a code review tool that analyses your code and generates a summary of the source code changes in plain
English.
This rather…]]></description><link>https://www.awesomecodereviews.com/tools/code-review-descriptions-what-the-diff/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/tools/code-review-descriptions-what-the-diff/</guid><pubDate>Sat, 18 Feb 2023 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Whatthediff is a code review tool that analyses your code and generates a summary of the source code changes in plain
English.
This rather small but focused code review helper tool neatly enhances GitHub’s code review functionality.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/3fc75d483b40dfd10e1beda112646914/f0846/What-the-diff.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 37%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAHABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAEF/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEAMQAAAB3aFB/8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQABBQJ//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQAGPwJ//8QAGRAAAgMBAAAAAAAAAAAAAAAAATEAEBFR/9oACAEBAAE/IUVNPK//2gAMAwEAAgADAAAAEIAP/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPxA//8QAGBAAAwEBAAAAAAAAAAAAAAAAAAERMUH/2gAIAQEAAT8QdZqidsEb6f/Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;whatthediff tool comments on PR with a description of changes&quot;
        title=&quot;whatthediff tool comments on PR with a description of changes&quot;
        src=&quot;/static/3fc75d483b40dfd10e1beda112646914/e5166/What-the-diff.jpg&quot;
        srcset=&quot;/static/3fc75d483b40dfd10e1beda112646914/f93b5/What-the-diff.jpg 300w,
/static/3fc75d483b40dfd10e1beda112646914/b4294/What-the-diff.jpg 600w,
/static/3fc75d483b40dfd10e1beda112646914/e5166/What-the-diff.jpg 1200w,
/static/3fc75d483b40dfd10e1beda112646914/f0846/What-the-diff.jpg 1383w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Precise Code Review Descriptions enable Good Code Reviews&lt;/h2&gt;
&lt;p&gt;Writing good code review descriptions, and explaining the changes to the code reviewers, is &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;a great code review practice&lt;/a&gt;. In particular, it helps to overcome the expert blind spot. The expert bling spot describes the problem that
the code author knows so much about what they worked on
that their code change seems trivial to them. Yet, for a code reviewer who has not worked on this code before,
building a mental model of the code changes takes a lot of cognitive effort.
The code reviewer has to analyze the files, see what changed, and gradually build an understanding the code change.
A code review description can help to reduce this effort and enables the reviewer to give better feedback.&lt;/p&gt;
&lt;h2&gt;Code review descriptions are often sparse&lt;/h2&gt;
&lt;p&gt;While &lt;a href=&quot;/workshops/&quot;&gt;working with many engineering teams&lt;/a&gt;, I saw that many developers and teams do not provide good enough code review descriptions.
Instead, the description of the code change is often a one-liner followed by a bullet-point list of all the commit messages.
Here, this little tool can help to ehnance the pull request with a summary of the changes.
This summary then can not only help the code reviewer understand the change, but also the code author to remember what they did.
Based on this memory aid, the code author can then fill in the blanks that the tool can not know, like why they chose a certain approach,
or what the reviewer should focus on and enhance the code review description with this information.&lt;/p&gt;
&lt;h2&gt;Refactoring feature of the whatthediff code review tool&lt;/h2&gt;
&lt;p&gt;Whatthediff is like ChatGPT, or GitHub Co-pilot, but focuses on improving the reviewability of your pull requests.
The tool developers also
work on other cool features, like the automatic refactoring of code.
Whenever you see code that you think should be refactored, you comment with &lt;em&gt;“/wtd”&lt;/em&gt; and describe the change you want to see,
and let the tool take care of the rest.&lt;/p&gt;
&lt;h2&gt;Tool Verdict&lt;/h2&gt;
&lt;p&gt;My take on the &lt;a href=&quot;https://whatthediff.ai/&quot;&gt;&lt;em&gt;whatthediff&lt;/em&gt;&lt;/a&gt; code review tool is that it’s indeed a nice little code review helper if you are not worried about IP issues (you have to grant the tool full excess to your source code).
I added it to my toolbox for my open-source projects, and I’m always curious to see how well it describes my changes.
Often, I’m surprised that it neatly describes all the changes and even a bit of the intention of the code.
Other times, it generates rather unhelpful change descriptions like “File changed”.
Yet, overall I’ve had many good and helpful change summaries that make for a great tool experience.&lt;/p&gt;
&lt;h2&gt;Change summaries are not enough&lt;/h2&gt;
&lt;p&gt;The most important critique is that change summaries are only one part of a good code review description.
Other important aspects of code review description, like an explanation of why this change is needed,
or guidance for the code reviewer on what they should focus on cannot be generated by the tool.
Yet, as described before, the automatic summary can also serve as a memory aid for the code authors and help them fill in the blanks.&lt;/p&gt;
&lt;p&gt;Right now, it only works with GitHub, but I’m pretty sure that we will see integrations with other code review tools soon.
If you want to check it out, you can find the &lt;a href=&quot;https://whatthediff.ai/&quot;&gt;whatthediff code review tool here&lt;/a&gt;.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Automatic code review descriptions with &amp;quot;Whatthediff&amp;quot; code review tool”: &lt;a href=&quot;https://www.awesomecodereviews.com/tools/code-review-descriptions-what-the-diff/&quot;&gt;https://www.awesomecodereviews.com/tools/code-review-descriptions-what-the-diff/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-02-18T09:59:30+01:00&quot;&gt;February 18, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Automated Code Reviews]]></title><description><![CDATA[To learn more about automation in code reviews read the following articles: 1. Copilot for Automated Code Reviews 2. Automated Code Review…]]></description><link>https://www.awesomecodereviews.com/automation/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/automation/</guid><pubDate>Thu, 16 Feb 2023 08:59:30 GMT</pubDate><content:encoded>&lt;h3&gt;To learn more about automation in code reviews read the following articles:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/automation/copilot-review/&quot;&gt;&lt;strong&gt;1. Copilot for Automated Code Reviews&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/automation/automated-code-reviews/&quot;&gt;&lt;strong&gt;2. Automated Code Review Tools&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/security/static-application-security-testing/&quot;&gt;&lt;strong&gt;3. Static Application Security Testing&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/security/dynamic-application-security-testing/&quot;&gt;&lt;strong&gt;4. Dynamic Application Security Testing&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/automation/codeql/&quot;&gt;&lt;strong&gt;5. CodeQL security scanning tool&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Automated Code Reviews”: &lt;a href=&quot;https://www.awesomecodereviews.com/automation&quot;&gt;https://www.awesomecodereviews.com/automation&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-02-22T09:59:30+01:00&quot;&gt;February 22, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Developer Experience]]></title><description><![CDATA[To learn more about developer experience read the following articles: 1. 10 Best Code Review Tools 2. 7 Best AI Code Review Tools 3. Copilot…]]></description><link>https://www.awesomecodereviews.com/devex/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/devex/</guid><pubDate>Thu, 16 Feb 2023 08:59:30 GMT</pubDate><content:encoded>&lt;h3&gt;To learn more about developer experience read the following articles:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;&lt;strong&gt;1. 10 Best Code Review Tools&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/tools/ai-code-review-tools/&quot;&gt;&lt;strong&gt;2. 7 Best AI Code Review Tools&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/automation/copilot-review/&quot;&gt;&lt;strong&gt;3. Copilot for Automated Code Reviews&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/tools/code-review-descriptions-what-the-diff/&quot;&gt;&lt;strong&gt;4. Whatthediff Code Review tool&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/automation/codeql/&quot;&gt;&lt;strong&gt;5. CodeQL security scanning tool&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/automation/automated-code-reviews/&quot;&gt;&lt;strong&gt;6. Automated Code Review Tools&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/automation/datadog-code-security/&quot;&gt;&lt;strong&gt;7. Datadog Code Security for code reviews&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Developer Experience”: &lt;a href=&quot;https://www.awesomecodereviews.com/devex&quot;&gt;https://www.awesomecodereviews.com/devex&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-02-22T09:59:30+01:00&quot;&gt;February 22, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Code Reviews at Companies]]></title><description><![CDATA[Learn how market leaders like Microsoft, Google or Spotify do code reviews.]]></description><link>https://www.awesomecodereviews.com/companies/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/companies/</guid><pubDate>Tue, 14 Feb 2023 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Learn how market leaders like Microsoft, Google or Spotify do code reviews.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Code Reviews at Companies”: &lt;a href=&quot;https://www.awesomecodereviews.com/companies/&quot;&gt;https://www.awesomecodereviews.com/companies/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-01-14T09:59:30+01:00&quot;&gt;January 14, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Dynamic Application Security Testing]]></title><description><![CDATA[Dynamic Application Security Testing (DAST) is a method of testing the security of an application by examining its behavior while it is…]]></description><link>https://www.awesomecodereviews.com/security/dynamic-application-security-testing/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/security/dynamic-application-security-testing/</guid><pubDate>Tue, 14 Feb 2023 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Dynamic Application Security Testing (DAST) is a method of testing the security of an application by examining its behavior while it is running.
It involves simulating real-world attacks and interactions with the application to identify security vulnerabilities and potential exploits.&lt;/p&gt;
&lt;h2&gt;When to use DAST&lt;/h2&gt;
&lt;p&gt;DAST is typically used after an application has been deployed, when it is running in a live environment.
It is a complementary technique to &lt;a href=&quot;/security/static-application-security-testing/&quot;&gt;Static Application Security Testing (SAST)&lt;/a&gt;, which analyzes source code before deployment.
DAST is particularly useful for identifying security vulnerabilities that cannot be detected through code analysis alone, such as configuration issues, input validation problems, and session management issues.&lt;/p&gt;
&lt;h2&gt;Who should do DAST&lt;/h2&gt;
&lt;p&gt;DAST can be performed by security professionals, penetration testers, or developers.
However, it is usually performed by security professionals who have the expertise and experience to perform this type of testing.&lt;/p&gt;
&lt;h2&gt;How to do DAST&lt;/h2&gt;
&lt;p&gt;There are several steps involved in performing DAST:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Planning: Define the scope and objectives of the DAST test.&lt;/li&gt;
&lt;li&gt;Preparation: Set up the testing environment, including the application, network infrastructure, and test tools.&lt;/li&gt;
&lt;li&gt;Scanning: Perform the actual test by simulating real-world attacks on the application and analyzing its behavior.&lt;/li&gt;
&lt;li&gt;Reporting: Analyze the results of the test and produce a report that includes a list of vulnerabilities, their severity, and recommendations for remediation.&lt;/li&gt;
&lt;li&gt;Remediation: Fix the identified security vulnerabilities, and re-test the application to ensure that it is secure.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;DAST and code review&lt;/h2&gt;
&lt;p&gt;Dynamic Application Security Testing (DAST) is not typically done during code review, as code review is focused on the quality and maintainability of the code, whereas DAST is focused on the security of the application as it is running.
Code review is usually performed during the development phase before the application is deployed, while DAST is performed after the application has been deployed.&lt;/p&gt;
&lt;h2&gt;Shifting security left&lt;/h2&gt;
&lt;p&gt;However, it is possible to integrate security considerations into the code review process by incorporating both code analysis (such as SAST) and dynamic testing (such as DAST) into the development process.
By doing so, organizations can shift security left and catch security vulnerabilities early in the development cycle, reducing the risk of data breaches and ensuring that their applications are secure.&lt;/p&gt;
&lt;h2&gt;Popular DAST tools&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;OWASP ZAP: An open-source DAST tool that is easy to use and provides a graphical user interface for performing automated security scans.&lt;/li&gt;
&lt;li&gt;Nessus: A commercial DAST tool that offers both vulnerability scanning and penetration testing capabilities.&lt;/li&gt;
&lt;li&gt;Burp Suite: A commercial DAST tool that provides a comprehensive set of features for performing web application security testing.&lt;/li&gt;
&lt;li&gt;Acunetix: A commercial DAST tool that is specifically designed for web application security testing and provides both vulnerability scanning and manual testing capabilities.&lt;/li&gt;
&lt;li&gt;Qualys Web Application Scanning: A commercial DAST tool that provides both vulnerability scanning and penetration testing capabilities.&lt;/li&gt;
&lt;li&gt;WebInspect: A commercial DAST tool that provides comprehensive web application security testing capabilities, including vulnerability scanning and penetration testing.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;DAST is a valuable technique for testing the security of an application and identifying security vulnerabilities that cannot be detected through code analysis alone.
By performing DAST, organizations can reduce the risk of data breaches and ensure that their applications are secure.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Dynamic Application Security Testing”: &lt;a href=&quot;https://www.awesomecodereviews.com/security/dynamic-application-security-testing/&quot;&gt;https://www.awesomecodereviews.com/security/dynamic-application-security-testing/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-02-14T09:59:30+01:00&quot;&gt;February 14, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Static Application Security Testing]]></title><description><![CDATA[Static Application Security Testing (SAST) is a software testing technique that aims to identify security vulnerabilities in an application…]]></description><link>https://www.awesomecodereviews.com/security/static-application-security-testing/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/security/static-application-security-testing/</guid><pubDate>Tue, 14 Feb 2023 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Static Application Security Testing (SAST) is a software testing technique that aims to identify security vulnerabilities in an application’s source code before it is deployed.
SAST is performed at an early stage of the software development lifecycle and helps to find and fix security vulnerabilities before they can be exploited.
Using static analysis tools during code reviews, and integrating them in your CI/CD pipeline is a &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practice&lt;/a&gt; and helps to improve the reliability and security of applications, as well as to reduce the manual inspection time during code reviews.&lt;/p&gt;
&lt;h2&gt;When to use SAST&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;During development: SAST can be used throughout the development process to identify and fix security vulnerabilities early on, reducing the risk of these issues being introduced into the production environment.&lt;/li&gt;
&lt;li&gt;As part of a security audit: SAST can be used as part of a security audit to check an existing application’s source code for security vulnerabilities.&lt;/li&gt;
&lt;li&gt;Before deployment: SAST can be used to check the source code of an application before it is deployed, to ensure that it does not contain any security vulnerabilities that could be exploited in the production environment.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;How to perform SAST&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Prepare the code: The source code of the application should be made available for analysis.&lt;/li&gt;
&lt;li&gt;Choose a SAST tool: There are many SAST tools available, each with its own features and capabilities. Choose a tool that best fits your needs and the specific requirements of your application.&lt;/li&gt;
&lt;li&gt;Configure the tool: Set up the SAST tool, including configuring any custom rules or security policies that need to be enforced.&lt;/li&gt;
&lt;li&gt;Run the SAST analysis: Start the SAST analysis by running the tool on the source code. The tool will scan the code and identify any security vulnerabilities or code issues.&lt;/li&gt;
&lt;li&gt;Review the results: Review the results of the SAST analysis to identify any security vulnerabilities or code issues.&lt;/li&gt;
&lt;li&gt;Fix the vulnerabilities: Fix the security vulnerabilities by making the necessary changes to the source code.&lt;/li&gt;
&lt;li&gt;Repeat the analysis: Repeat the SAST analysis until all security vulnerabilities have been fixed.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;SAST during code review&lt;/h2&gt;
&lt;p&gt;To automate the process of identifying and fixing security vulnerabilities in the source code, SAST can be integrated into the code review process.&lt;/p&gt;
&lt;p&gt;SAST tools can be integrated into the code review process, allowing for automated scanning of code changes before they are committed to the repository.
Automating the security analysis reduces the time and effort required for manual code review. In addition, static analysis tools are often much more reliable to find certain security issues. Another benefit of integrating SAST into the code review process is that security assessments can be performed continuously, ensuring that security vulnerabilities are detected and fixed as soon as they are introduced.
It also helps to improve collaboration between developers, security teams, and stakeholders by providing a clear and comprehensive report of security vulnerabilities and code issues.&lt;/p&gt;
&lt;h2&gt;Shifting security left&lt;/h2&gt;
&lt;p&gt;Shifting security left refers to the practice of integrating security considerations into the early stages of the software development lifecycle, rather than waiting until later stages when it may be more difficult and expensive to address security issues. Integrating Static Application Security Testing (SAST) during code reviews performed by developers is a key aspect of shifting security left, as it allows security vulnerabilities to be identified and fixed as soon as they are introduced into the codebase.&lt;/p&gt;
&lt;h2&gt;SAST tools&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Checkmarx: Checkmarx is a comprehensive SAST tool that provides advanced code analysis capabilities, including support for multiple programming languages, deep code scanning, and a user-friendly interface.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SonarQube: SonarQube is a popular open-source SAST tool that provides automatic code analysis and reporting, including support for multiple programming languages, integration with multiple tools and platforms, and an extensive library of custom rules and plugins.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Veracode: Veracode is a cloud-based SAST tool that provides a complete suite of security solutions, including support for multiple programming languages, automatic scanning and reporting, and integration with popular development tools.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Fortify: Fortify is a SAST tool that provides advanced code analysis capabilities, including support for multiple programming languages, deep code scanning, and integration with popular development tools.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Synopsys: Synopsys is a SAST tool that provides deep code analysis and reporting, including support for multiple programming languages, integration with popular development tools, and a user-friendly interface.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Coverity: Coverity is a SAST tool that provides deep code analysis and reporting, including support for multiple programming languages, integration with popular development tools, and a user-friendly interface.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Static analysis tools and security scanner&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/automation/codeql/&quot;&gt;CodeQL&lt;/a&gt;: Semantic code analysis engine to detect security vulnerabilities&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://pmd.github.io/&quot;&gt;PMD&lt;/a&gt;: An extensible cross-language static code analyzer&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://semgrep.dev/&quot;&gt;Semgrep&lt;/a&gt;: Security scans during continuous integration&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;In conclusion, SAST is an important technique for improving the security of applications. By identifying security vulnerabilities in the source code before deployment, SAST helps to reduce the risk of these issues being exploited in the production environment. SAST is performed by using a SAST tool to scan the source code and identify security vulnerabilities, which are then fixed by the development team.&lt;/p&gt;
&lt;p&gt;Learn also about &lt;a href=&quot;/security/dynamic-application-security-testing/&quot;&gt;dynamic application security testing&lt;/a&gt;, equip yourself with an awesome &lt;a href=&quot;/checklists/secure-code-review-checklist/&quot;&gt;secure code review checklist&lt;/a&gt;, and read about the &lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;10 best code review tools&lt;/a&gt;.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Static Application Security Testing”: &lt;a href=&quot;https://www.awesomecodereviews.com/security/static-application-security-testing/&quot;&gt;https://www.awesomecodereviews.com/security/static-application-security-testing/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-12-05T09:59:30+01:00&quot;&gt;December 05, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Code Review Tools]]></title><description><![CDATA[To learn more about code review tools read the following articles: 1. 10 Best Code Review Tools 2. 7 Best AI Code Review Tools 3. Copilot…]]></description><link>https://www.awesomecodereviews.com/tools/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/tools/</guid><pubDate>Tue, 14 Feb 2023 08:59:30 GMT</pubDate><content:encoded>&lt;h3&gt;To learn more about code review tools read the following articles:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;&lt;strong&gt;1. 10 Best Code Review Tools&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/tools/ai-code-review-tools/&quot;&gt;&lt;strong&gt;2. 7 Best AI Code Review Tools&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/automation/copilot-review/&quot;&gt;&lt;strong&gt;3. Copilot for Automated Code Reviews&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/tools/code-review-descriptions-what-the-diff/&quot;&gt;&lt;strong&gt;4. Whatthediff Code Review tool&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/automation/codeql/&quot;&gt;&lt;strong&gt;5. CodeQL security scanning tool&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/automation/automated-code-reviews/&quot;&gt;&lt;strong&gt;6. Automated Code Review Tools&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/automation/datadog-code-security/&quot;&gt;&lt;strong&gt;7. Datadog Code Security for code reviews&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Code Review Tools”: &lt;a href=&quot;https://www.awesomecodereviews.com/tools/&quot;&gt;https://www.awesomecodereviews.com/tools/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-01-14T09:59:30+01:00&quot;&gt;January 14, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Scanning for security vulnerabilities with CodeQL]]></title><description><![CDATA[CodeQL is GitHub’s static analysis engine for finding security vulnerabilities and coding errors.
It extracts a relational representation of…]]></description><link>https://www.awesomecodereviews.com/automation/codeql/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/automation/codeql/</guid><pubDate>Tue, 14 Feb 2023 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;CodeQL is GitHub’s static analysis engine for finding security vulnerabilities and coding errors.
It extracts a relational representation of a codebase into a CodeQL database, then runs queries against that
database. The representation includes syntax, types, control flow, and data flow, so queries can follow values
across a program instead of matching text alone. CodeQL does not “understand the developer’s intent,” and a clean
scan does not prove that an application is secure.&lt;/p&gt;
&lt;p&gt;CodeQL complements, rather than replaces, manual practices such as using a
&lt;a href=&quot;/checklists/secure-code-review-checklist/&quot;&gt;secure code review checklist&lt;/a&gt;. GitHub’s
&lt;a href=&quot;https://codeql.github.com/docs/codeql-overview/about-codeql/&quot;&gt;CodeQL overview&lt;/a&gt; explains the analysis model in
more detail.&lt;/p&gt;
&lt;h2&gt;Who should use CodeQL&lt;/h2&gt;
&lt;p&gt;CodeQL can be used during development, in continuous integration, while reviewing pull requests, and as part of
&lt;a href=&quot;/security/static-application-security-testing/&quot;&gt;static application security testing&lt;/a&gt;. Most teams can start with
GitHub’s maintained queries; writing custom queries is optional.&lt;/p&gt;
&lt;p&gt;Developers and reviewers can use code scanning alerts to inspect a finding, trace data-flow paths, and discuss or
fix the affected code. Security specialists can develop custom queries for organization-specific vulnerability
patterns or use CodeQL for variant analysis: finding other instances of a known vulnerability pattern.&lt;/p&gt;
&lt;h2&gt;How to use CodeQL&lt;/h2&gt;
&lt;p&gt;You do not need to install the CodeQL CLI or write queries to start using CodeQL on GitHub. There are three common
setup options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Default setup:&lt;/strong&gt; Enable CodeQL in the repository’s code security settings. GitHub detects supported languages,
selects a build mode, and creates the scanning configuration. This is the recommended starting point for
eligible repositories.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Advanced setup:&lt;/strong&gt; Commit a GitHub Actions workflow when you need control over languages, build steps, triggers,
runners, query suites, or custom query packs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CodeQL CLI:&lt;/strong&gt; Create and analyze CodeQL databases locally or in an external CI system. Results can be exported
as SARIF and uploaded to GitHub code scanning.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;GitHub documents the tradeoffs in
&lt;a href=&quot;https://docs.github.com/en/code-security/concepts/code-scanning/setup-types&quot;&gt;About setup types for code scanning&lt;/a&gt;.
Code scanning with CodeQL is available for public repositories on GitHub.com. Private and internal repositories
need to be owned by an organization on GitHub Team or GitHub Enterprise with GitHub Code Security enabled.&lt;/p&gt;
&lt;p&gt;On GitHub, an alert can include the affected location, severity, an explanation, data-flow paths when relevant,
and guidance for fixing the problem. Copilot Autofix may also suggest a change for supported queries, but it does
not produce a fix for every alert and generated fixes still require review and testing.&lt;/p&gt;
&lt;h2&gt;CodeQL during code review&lt;/h2&gt;
&lt;p&gt;With pull-request scanning enabled, findings can appear in the &lt;strong&gt;Code scanning results&lt;/strong&gt; check and as annotations
on changed lines. A finding is shown on a pull request only when all lines identified by the alert are present in
the pull-request diff, so reviewers should not treat the annotations as a complete assessment of the repository.&lt;/p&gt;
&lt;p&gt;Teams can configure which severity levels fail the check and can make the check required through branch
protection. Reviewers should still validate whether a result is exploitable, whether a proposed fix is safe, and
whether tests cover the change. See GitHub’s guide to
&lt;a href=&quot;https://docs.github.com/en/code-security/how-tos/manage-security-alerts/manage-code-scanning-alerts/triage-alerts-in-pull-requests&quot;&gt;triaging code scanning alerts in pull requests&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;CodeQL integration and supported languages&lt;/h2&gt;
&lt;p&gt;CodeQL currently supports:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;C and C++&lt;/li&gt;
&lt;li&gt;C#&lt;/li&gt;
&lt;li&gt;Go&lt;/li&gt;
&lt;li&gt;Java and Kotlin&lt;/li&gt;
&lt;li&gt;JavaScript and TypeScript&lt;/li&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Ruby&lt;/li&gt;
&lt;li&gt;Rust&lt;/li&gt;
&lt;li&gt;Swift&lt;/li&gt;
&lt;li&gt;GitHub Actions workflows&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CodeQL does not support every programming language; for example, PHP and Scala are not currently supported. Check
GitHub’s current
&lt;a href=&quot;https://docs.github.com/en/code-security/concepts/code-scanning/codeql/codeql-code-scanning&quot;&gt;CodeQL language list&lt;/a&gt;
before planning a rollout.&lt;/p&gt;
&lt;p&gt;GitHub Actions is the most direct integration on GitHub. Advanced setup can also run on self-hosted runners, while
the CodeQL CLI supports external CI systems.&lt;/p&gt;
&lt;h2&gt;Predefined queries&lt;/h2&gt;
&lt;p&gt;GitHub maintains two built-in query suites:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;default&lt;/code&gt; prioritizes high-precision security queries and aims to keep false-positive results low.&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;security-extended&lt;/code&gt; includes the default suite plus additional queries with slightly lower precision and
severity, so it may find more issues but can also produce more false positives.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These queries are distributed in CodeQL query packs; they are not stored in the CodeQL database. The database
contains the representation extracted from the codebase. GitHub maintains a current
&lt;a href=&quot;https://docs.github.com/en/code-security/concepts/code-scanning/codeql/codeql-query-suites&quot;&gt;comparison of the built-in query suites&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Custom queries&lt;/h2&gt;
&lt;p&gt;The built-in suites do not cover every application-specific security rule. CodeQL’s QL language lets security
specialists create queries for a known vulnerability pattern or an organization’s policies. Queries and
libraries can be grouped and shared as CodeQL packs.&lt;/p&gt;
&lt;p&gt;Use advanced setup to add custom query packs to GitHub code scanning. The CodeQL CLI and the CodeQL extension for
Visual Studio Code are intended for developing and testing queries. Custom queries should be tested for precision
before they become merge-blocking checks; a noisy rule can train reviewers to ignore useful alerts.&lt;/p&gt;
&lt;h2&gt;CodeQL example&lt;/h2&gt;
&lt;p&gt;CodeQL includes language-specific queries for several forms of cross-site scripting (XSS). An XSS query can track
untrusted data from a source, such as an HTTP request, through the program to a sink that renders HTML or
JavaScript. If the path does not pass through a recognized sanitizer, CodeQL may report it and show the data-flow
path. The alert is a starting point for review: a reviewer still needs to confirm the trust boundary, framework
behavior, and whether the data is safely encoded for the output context.&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://codeql.github.com/&quot;&gt;CodeQL&lt;/a&gt; is a query-based static analysis tool that integrates closely with GitHub
code scanning. Default setup is the simplest route for most eligible repositories; advanced setup and the CLI
provide control for custom builds, CI systems, and queries. During review, CodeQL is most useful as a consistent
source of security findings and data-flow evidence, not as a substitute for human judgment or testing.&lt;/p&gt;
&lt;p&gt;Learn more about the &lt;a href=&quot;/automation/automated-code-reviews/&quot;&gt;best automated code review tools&lt;/a&gt; and
&lt;a href=&quot;/security/static-application-security-testing/&quot;&gt;static application security testing&lt;/a&gt;.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Scanning for security vulnerabilities with CodeQL”: &lt;a href=&quot;https://www.awesomecodereviews.com/automation/codeql/&quot;&gt;https://www.awesomecodereviews.com/automation/codeql/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2026-07-24T09:59:30+02:00&quot;&gt;July 24, 2026&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Code Review Checklists]]></title><description><![CDATA[To learn more about using checklist during code reviews read the following articles: 1. Checklist-based Code Reviews 2. Security-focused…]]></description><link>https://www.awesomecodereviews.com/checklists/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/checklists/</guid><pubDate>Sun, 29 Jan 2023 08:59:30 GMT</pubDate><content:encoded>&lt;h3&gt;To learn more about using checklist during code reviews read the following articles:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;&lt;strong&gt;1. Checklist-based Code Reviews&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/checklists/secure-code-review-checklist/&quot;&gt;&lt;strong&gt;2. Security-focused checklist&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/checklists/topic-based-code-review-checklists/&quot;&gt;&lt;strong&gt;3. Specific Review Checklists&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Code Review Checklists”: &lt;a href=&quot;https://www.awesomecodereviews.com/checklists/&quot;&gt;https://www.awesomecodereviews.com/checklists/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-02-22T09:59:30+01:00&quot;&gt;February 22, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Security code review checklist]]></title><description><![CDATA[Using a secure code review checklist helps you find security vulnerabilities systematically during code review, and is a code review best…]]></description><link>https://www.awesomecodereviews.com/checklists/secure-code-review-checklist/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/checklists/secure-code-review-checklist/</guid><pubDate>Thu, 26 Jan 2023 22:40:32 GMT</pubDate><content:encoded>&lt;p&gt;Using a secure code review checklist helps you find security vulnerabilities systematically during code review, and is a &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practice&lt;/a&gt;. With this security code review checklist, you know exactly which security flaws to look for and how to implement secure coding practices.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Table of Content:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#popular-security-vulnerabilities-lists&quot;&gt;Popular security vulnerabilities lists&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#security-vulnerabilities-undetected&quot;&gt;Security vulnerabilities are often undetected&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#find-security-vulnerabilities-systematically&quot;&gt;Find security vulnerabilities systematically&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#secure-code-review-checklist---short-version&quot;&gt;Secure code review checklist - Short version:&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#secure-code-review-checklist---extended-version&quot;&gt;Secure code review checklist - Extended version&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#input-validation&quot;&gt;Input Validation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#authentication-and-user-management&quot;&gt;Authentication and User Management&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#authorization&quot;&gt;Authorization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#session-management&quot;&gt;Session Management&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#encryption-and-cryptography&quot;&gt;Encryption and Cryptography&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#exception-handling&quot;&gt;Exception Handling&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#practice&quot;&gt;Practice finding security flaws during code reviews&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;popular-security-vulnerabilities-lists&quot;&gt;Popular security vulnerabilities lists&lt;/h2&gt;
&lt;p&gt;You probably heard about the &lt;a href=&quot;https://owasp.org/www-project-top-ten/&quot;&gt;OWASP Top 10&lt;/a&gt;, or the &lt;a href=&quot;https://cwe.mitre.org/top25/archive/2020/2020_cwe_top25.html&quot;&gt;CWE Top 25&lt;/a&gt;. OWASP Top 10 is a list of the ten most critical web application security risks, such as Injection
Broken Authentication and Session Management, or Cross-Site Scripting (XSS). OWASP Top 10 are published and maintained by the OWASP (Open Web Application Security Project) community. Similarly, the CWE Top 25 is a list of the 25 most prevalent software weaknesses which the MITRE Corporation publishes and updates. In contrast to the OWASP Top 10 which focuses on web application security risks, the CWE Top 10 focuses on a broader range of software security vulnerabilities that also affect mobile and desktop applications.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Watch my video on finding security vulnerabilities and bugs that appeared on the OWASP DevSlop show to learn more about secure code reviewing.&lt;/em&gt;&lt;/p&gt;
&lt;div class=&quot;gatsby-resp-iframe-wrapper&quot; style=&quot;padding-bottom: 58.44155844155844%; position: relative; height: 0; overflow: hidden; margin-bottom: 1.0725rem&quot; &gt; &lt;iframe src=&quot;https://www.youtube.com/embed/kpf3UkMc5Y4&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; style=&quot; position: absolute; top: 0; left: 0; width: 100%; height: 100%; &quot;&gt;&lt;/iframe&gt; &lt;/div&gt;
&lt;h2 id=&quot;security-vulnerabilities-undetected&quot;&gt;Security vulnerabilities are often undetected&lt;/h2&gt;
&lt;p&gt;The problem is, even if you heard about both lists highlighting common security risks, and even if you studied the listed vulnerabilities, it’s unlikely you know them all by heart.
As a result, during code reviews, many security vulnerabilities are overlooked by developers. Also, following the “shift left” mentality of testing and security, you do not want to wait for a dedicated security team to perform &lt;a href=&quot;/security/static-application-security-testing/&quot;&gt;static application security testing&lt;/a&gt;, or to find many issues during &lt;a href=&quot;/security/dynamic-application-security-testing/&quot;&gt;dynamic application security testing&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/2208.04261&quot;&gt;A study about security aspects during code reviews&lt;/a&gt; confirms that developers often do not focus on security aspects during code reviews. Many developers that participated in the experiment did not find the seeded security bugs. When the researchers reminded the developers to explicitly inspect the code for security flaws, their ability to find security defects increased.
Yet, the study made clear that developers still struggle with finding security issues during code reviews. The researchers state: “developers report the lack of training and security knowledge as the main challenges they face when checking for security issues.”&lt;/p&gt;
&lt;h2 id=&quot;find-security-vulnerabilities-systematically&quot;&gt;Find security vulnerabilities systematically&lt;/h2&gt;
&lt;p&gt;This is where secure code review checklists, also referred to as security checklists, come into play.
&lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;Code review checklists&lt;/a&gt; are a wonderful learning and mentoring tool, and an important &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practice&lt;/a&gt;.
They also help you remember which issues you should focus on.
Finally, with a secure code review checklist, you can inspect the code &lt;em&gt;systematically&lt;/em&gt; for security vulnerabilities.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Reviewers using a code review checklist outperform reviewers who are not.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;All three benefits of using a security-focused code review checklist help you adapt, practice and promote secure coding practices within your team. So, without further ado, let’s have a look at a secure coding checklist:&lt;/p&gt;
&lt;h2 id=&quot;secure-code-review-checklist---short-version&quot;&gt;Secure code review checklist - Short version:&lt;/h2&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; What security vulnerabilities is this code susceptible to?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are authorization and authentication handled in the right way?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is (user) input validated, sanitized, and escaped to prevent cross-site scripting or SQL injection?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is sensitive data like user data, or credit card information securely handled and stored?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Does this code NOT reveal some secret information like keys, passwords, or usernames?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is data retrieved from external APIs or libraries checked accordingly?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Does error handling or logging NOT expose the system to vulnerabilities?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is the right encryption used?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;secure-code-review-checklist---extended-version&quot;&gt;Secure code review checklist - Extended version&lt;/h2&gt;
&lt;h3 id=&quot;input-validation&quot;&gt;Input Validation&lt;/h3&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are inputs from external sources validated?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is user input tested for type, length, format, and range, and by enforcing limits?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are flaws in regular expressions causing data validation problems?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are exact match approaches used?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are allow list approaches used (i.e., check strings for only expected values)?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are block list approaches used (i.e., rejected stings for inappropriate values)?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are XML documents validated against their schemas?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are string concatenations NOT used for user input?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are SQL statements NOT dynamically created by using user input?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is data validated on the server side?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is there a strong separation between data and commands, and data and client-side scripts?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is contextual escaping used when passing data to SQL, LDAP, OS and third-party commands?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are https headers validated for each request?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;authentication-and-user-management&quot;&gt;Authentication and User Management&lt;/h3&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are sessions handled correctly?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Do failure messages for invalid usernames or passwords NOT leak information?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are invalid passwords NOT logged (which can leak sensitive password &amp;#x26; user name combinations)?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are the password requirements (lengths/complexity) appropriate?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are invalid login attempts correctly handled with lockouts, and rate limits?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Does the “forgot password” routine NOT leak information, and is NOT vulnerable to spamming?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are passwords NOT sent in plain text via email?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are appropriate mechanisms such as hashing, salts, and encryption used for storing passwords and usernames?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;authorization&quot;&gt;Authorization&lt;/h3&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are authentication and authorization the first logic executed for each request?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are authorization checks granular (page and directory level)?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is access to pages and data denied by default?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is re-authenticate for requests that have side effects enforced?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are there clear roles for authorization?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Can authorization NOT be circumvented by parameter or cookie manipulation?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;session-management&quot;&gt;Session Management&lt;/h3&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are session parameters NOT passed in URLs?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Do session cookies expire in a reasonably short time?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are session cookies encrypted?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is session data being validated?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is private data in cookies kept to a minimum?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Does the application avoid excessive cookie use?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is the session id complex?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is the session storage secure?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Does the application properly handle invalid session ids?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are session limits e.g., inactivity timeouts, enforced?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are logouts invalidating the session?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are session resources released when sessions are invalidated?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;encryption-and-cryptography&quot;&gt;Encryption and Cryptography&lt;/h3&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are state-of-the-art encryption algorithms used (such as FIPS-140)?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are minimum key sizes supported?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; What types of data must be encrypted?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Has sensitive data been secured in memory, storage and transit?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Do restricted areas require SSL?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Is sensitive information passed to/from non-SSL pages?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;exception-handling&quot;&gt;Exception Handling&lt;/h3&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Do all methods have appropriate exceptions?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Do error messages shown to users NOT reveal sensitive information including stack traces, or ids?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Does the application fail securely when exceptions occur?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are system errors NOT shown to users?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are resources released and transactions rolled back when there is an error?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are all user or system actions are logged?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Do we make sure that sensitive information is NOT logged (e.g. passwords)?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Do we make sure we have logs or all important user management events (e.g. password reset)?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Are unusual activities such as multiple login attempts logged?&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; Do logs have enough detail to reconstruct events for audit purposes?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;practice&quot;&gt;Practice finding security flaws during code reviews&lt;/h2&gt;
&lt;p&gt;To practice finding security bugs during code reviews, I prepared a small codebase for you.
The codebase is in HTML, and JavaScript and uses Express.
As long as you have experience developing code, I recommend reviewing the code even if you are not familiar with JavaScript.&lt;br&gt;
The example codebase is small, and you should be able to find quite a few of the seeded security defects and other problems within the code. Here, you find &lt;a href=&quot;https://github.com/mgreiler/code-reviews&quot;&gt;the repository to test your secure coding practice&lt;/a&gt; knowledge.&lt;/p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Research is very clear on the power of &lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;code review checklists&lt;/a&gt;. Code reviewers who use a code review checklist outperform code reviewers that don’t. So, I hope this checklist is helpful and valuable to you and that you start boosting your code review effectiveness with it.&lt;/p&gt;
&lt;p&gt;You can find the &lt;a href=&quot;https://github.com/mgreiler/secure-code-review-checklist&quot;&gt;security code review checklist&lt;/a&gt; also on GitHub. And, &lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;check-out my general code review checklist&lt;/a&gt; that helps you focus on the most important issues during code review. Also, read about other &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;best practices for code reviews here&lt;/a&gt;.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Security code review checklist”: &lt;a href=&quot;https://www.awesomecodereviews.com/checklists/secure-code-review-checklist/&quot;&gt;https://www.awesomecodereviews.com/checklists/secure-code-review-checklist/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-01-26T22:40:32.169Z&quot;&gt;January 26, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[30 Proven Code Review Best Practices]]></title><description><![CDATA[Which code review best practices do companies such as Microsoft, or Google follow to ensure great code review feedback? How do you stay…]]></description><link>https://www.awesomecodereviews.com/best-practices/code-review-best-practices/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/best-practices/code-review-best-practices/</guid><pubDate>Tue, 17 Jan 2023 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Which code review best practices do companies such as &lt;a href=&quot;/code-reviews-at-microsoft/&quot;&gt;Microsoft&lt;/a&gt;, or &lt;a href=&quot;/code-reviews-at-google/&quot;&gt;Google&lt;/a&gt; follow to ensure &lt;a href=&quot;https://www.michaelagreiler.com/great-code-review-feedback/&quot;&gt;great code review feedback&lt;/a&gt;? How do you &lt;a href=&quot;https://www.michaelagreiler.com/developer-productivity/&quot;&gt;stay productive&lt;/a&gt; while doing code reviews?&lt;br&gt;
In this article, you learn 30 code review best &lt;a href=&quot;#practicesreviewers&quot;&gt;practices for code reviewers&lt;/a&gt; and for &lt;a href=&quot;#practiceauthor&quot;&gt;code authors&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As this article is an in-depth resource, let me give you a quick overview of the 30 best practices for code review first.&lt;/p&gt;
&lt;h2&gt;Code Review Best Practices Overview&lt;/h2&gt;
&lt;div class=&quot;row&quot;&gt;
   &lt;div class=&quot;col-md-6&quot;&gt;
      &lt;h3&gt;For code authors&lt;/h3&gt;  
      &lt;ol&gt;
         &lt;li&gt;&lt;a href=&quot;#read&quot;&gt;Read through your changes&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#small&quot;&gt;Aim for small changes&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#cluster&quot;&gt;Cluster related changes&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#description&quot;&gt;Provide a description&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#runtests&quot;&gt;Run tests&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#automate&quot;&gt;Automate code reviews&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#skip&quot;&gt;Skip code reviews&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#fewerreviewers&quot;&gt;Fewer reviewers&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#expectations&quot;&gt;Clarify expectations&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#experienced&quot;&gt;Add experienced reviewers&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#inexperienced&quot;&gt;Add inexperienced reviewers&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#notify&quot;&gt;Notify the right people&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#headsup&quot;&gt;Give a heads up&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#beopen&quot;&gt;Be open to feedback&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#gratitude&quot;&gt;Show gratitude&lt;/a&gt;&lt;/li&gt;
      &lt;/ol&gt;   
   &lt;/div&gt;
   &lt;div class=&quot;col-md-6&quot;&gt;
      &lt;h3&gt;For code reviewers&lt;/h3&gt;  
      &lt;ol start=&quot;16&quot;&gt;
         &lt;li&gt;&lt;a href=&quot;#respectfulfeedback&quot;&gt;Give respectful feedback&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#inperson&quot;&gt;Talk in person&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#document&quot;&gt;Document decisions&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#explain&quot;&gt;Explain your viewpoint&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#norejections&quot;&gt;Make rejections exceptions&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#routine&quot;&gt;Do reviews daily&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#noswitching&quot;&gt;No context-switching&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#timelyfeedback&quot;&gt;Give timely feedback&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#timezones&quot;&gt;Consider time zones&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#teameffort&quot;&gt;Make it a team effort&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#reviewoften&quot;&gt;Review often&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#coreissues&quot;&gt;Focus on core issues&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#testsfirst&quot;&gt;Review tests first&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#checklists&quot;&gt;Use checklists&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href=&quot;#bias&quot;&gt;Fight bias&lt;/a&gt;&lt;/li&gt;     
      &lt;/ol&gt; 
   &lt;/div&gt;
&lt;/div&gt; 
&lt;br/&gt;
&lt;p&gt;The benefits of code reviews rise and fall with the value of the code review feedback. If done correctly, code reviews can help to ensure a high-quality code base. However, if teams are not aware of and do not follow best practices for code review, developers may experience several &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;code review challenges&lt;/a&gt;. In the worst case, &lt;a href=&quot;../../downloads/research/code-reviews-do-not-find-bugs.pdf&quot;&gt;reviewing code can slow your team down&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I have been researching and working with teams at Microsoft for several years. Through &lt;a href=&quot;https://www.michaelagreiler.com/publications/&quot;&gt;several large scale-studies&lt;/a&gt;, we discovered several best practices that help teams during code review to stay productive and &lt;a href=&quot;https://www.michaelagreiler.com/great-code-review-feedback/&quot;&gt;boost their code review value&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you are new to code review, let’s look at a typical code review process in a nutshell, or read get a full picture in the &lt;a href=&quot;/fundamentals/code-review-101/&quot;&gt;code review 101 guide&lt;/a&gt;.
You can also skip this introduction and jump directly to the &lt;a href=&quot;#practiceauthor&quot;&gt;first peer code review best practices&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;A typical code review process&lt;/h2&gt;
&lt;p&gt;A &lt;a href=&quot;/code-reviews-at-microsoft/&quot;&gt;typical tool-based code review process&lt;/a&gt; starts when the engineer prepares the code for review.
Then, she selects relevant reviewers for the code change.
The reviewers are notified.
The reviewers then inspect the code for defects, readability, and maintainability and give feedback on the code.
The code review author works on the feedback until all parties are satisfied. Then, the code is merged with the common code base.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 414px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 158.33333333333334%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAgCAYAAAASYli2AAAACXBIWXMAABJ0AAASdAHeZh94AAAEjklEQVRIx5VWS2wbVRSdDeoGiS5ZsajY8JMACcGODSxYARsQElt2iEZhEYEKRKIIsohAIovIdaU0StqmilJCRHGT0pSqaez4b8dK7PjvicdOHP9nxh7PzEH3eTwZ22kTrvT03ry5OnPe/Zw3nK7r0DQN1tk6aI9sZWUFCwsL6JqOlqahrqpoqCpEtetD/hxOMVVV2Tw7O4upqSkDT4e30cRqpYY/ShV4G+IxoCRJyGaz4HkemUwG+/v77JkGOZAlk0lMTk5iYmICwWCQ7XlqDaxVarAJBwg2LYBHR0cIBALweDyIRCJsHQ6HEY1GmZMgCJiensbY2BhGR0cZy2QiAb/cxnyxhN/zRfitDGmxt7eHzc1NxoRAaU1syWiOx+MYHx/HyMgI800kEvBJMtbKVcwdlBCwMuwF/kmj5+hwOLC8vIxWq8X2UpKMcFOCryEiLrf6AZ9mvWybzwPvBn3ZkUVRRKlUQrVaRaVSAcWV1lZHYqsajB3lKrZFia01S4mRMcB0Og2v18viQzHc2trC9vb2EMOOMV9MZLFUKnfLaoA9A2y32wyIgAnU5XKhXq8fAxpMyFz1Jl5wh/BBJIaS0jFZ9qwPcGdnB7u7u/D7/Tg8POxj2GMpaRo+jyYxkROGjmzGkBapVIrVHgHS3IshAzJY4oQEWj9mZvlJmbY6EhgVR1TX8UAHXGoRWS1ppr0vKaeVDYEVdB1Lug67rsMGwK40MSPdxD11FS29fcyQyqHZbJqDepsGFTATBl0HFcgKgCsAFnUNax0dDimJhc48bMoVrCvrjCkFhqOEUB9TZp1OJ0sIZXtjYwMpo/2CioKLwgFuaxq8goBUsYjUwQEelJ24rl3HTOsaikqx/8gERMnI5XLw+XxoNBqmVH0aiYFbe4RveQE/LdzCy1dseM1mx6XFOdzDn7jatsEneRhLdmTqEgIjcSAhoBLK5/OQW93YvB+Ogrv/GB+Go3C4nPjorgOf3XVgZvMx7PJ9/FKex1+lRJdhp9Nh7IgVAYVCIdYlXo8HGZ5nTr/xBXDrTjy36cNqXYSoaRB1DXa5gnf4MN5N+xBs1M+WZbJaR8WLnhADPf9oC5+kI/i4EMWbfAgXsn58l4+z0FCnP1W+6F2vV3dECa+6wzjvdOGVXBAXsgG8kQng0n4MLUUxu+ZU+YIFtK2pWC6W8Gshi6tHPPz1itk9mrWwZVlmYkCDapHkjNaK8WUrKFmlrSDW7MqXioHWo4Xb7WayT31MdwrNJGG1Wq2vrRRjptvui720wVrr62nzyHTLETApTiwWY90y1M+G2nwZz+B1f2RIZNFLChkdlSSrXC4z1aZyOkm+yL5KZPGSdxt7kjwkYdxJd8OJamNRbLJ8u23uaYPyNchkUOOsUh+VZLwV2sXz7hAuGyI7lOXTTLMk5b3QLri/18GtPgT3zwa+TubY/82Z/216DOsdFW8T2OpDnJu7hWfmF3Hu9h0G+k2aNz/InZVdvtXGs84AuKU74GZugLuxBO7aTaZCP/OCGc//deR/q3V8n83jMl/Aj3wBP+QE2AuHULTjpPwHkIxK1KGA1v4AAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;A typical code review &quot;
        title=&quot;A typical code review &quot;
        src=&quot;/static/b9194c3d1e90ea25f8e56184ddde8c76/b910a/Code-review-cycle.png&quot;
        srcset=&quot;/static/b9194c3d1e90ea25f8e56184ddde8c76/5a46d/Code-review-cycle.png 300w,
/static/b9194c3d1e90ea25f8e56184ddde8c76/b910a/Code-review-cycle.png 414w&quot;
        sizes=&quot;(max-width: 414px) 100vw, 414px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;figcaption class=&quot;text-center&quot;&gt;A typical tool-based code review&lt;/figcaption&gt;
&lt;br/&gt;
&lt;p&gt;To ensure that the code review process is smooth and does not become a nightmare, it is important to &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;understand code review challenges&lt;/a&gt; and which code review best practices you can follow to overcome those.&lt;/p&gt;
&lt;p&gt;The main code review challenges are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;not getting useful feedback,&lt;/li&gt;
&lt;li&gt;not having enough time to do code reviews,&lt;/li&gt;
&lt;li&gt;code reviews taking too long, causing long waiting times.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The code review best practices below help counteract those challenges by making the job of the reviewers as easy as possible. They also help the reviewer focus on providing valuable feedback.&lt;/p&gt;
&lt;h2 id=&quot;practiceauthor&quot;&gt;Code review best practices for code authors&lt;/h2&gt;
&lt;p&gt;In a code review, there are two different stakeholders: the code author, who asks for feedback, and the code reviewers, who look through the code change and provide feedback. As a code review starts with the author, I explain the code review best practices for code authors first.&lt;/p&gt;
&lt;br&gt;
&lt;div class=&quot;row code-review-book-sign-up justify-content-md-center p-5 border&quot;&gt;
&lt;div class=&quot;col col-lg-6 col-sm-12&quot;&gt;
&lt;p&gt;
I prepared an exclusive &lt;a href=&quot;https://www.michaelagreiler.com/code-review-e-book/&quot;&gt;Code Review e-Book&lt;/a&gt; for my e-mail subscribers packed with all code review best practices, a code review checklist and other great insights and summaries about code reviews. Get the 20-page insights to code reviews now. &lt;a href=&quot;https://www.michaelagreiler.com/code-review-e-book/&quot;&gt;Get it now&lt;/a&gt;.
&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;col-lg-4  float-right&quot; style=&quot;max-width:450px;&quot;&gt;&lt;span class=&quot;gatsby-resp-image-wrapper&quot; style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 860px; &quot;&gt;
      &lt;span class=&quot;gatsby-resp-image-background-image&quot; style=&quot;padding-bottom: 65.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAIEAf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAGu5sGAT//EABoQAAEFAQAAAAAAAAAAAAAAABEAAQMQEhP/2gAIAQEAAQUCaaTW26IICv/EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABoQAAICAwAAAAAAAAAAAAAAABARABIhMUH/2gAIAQEABj8CWJXuyx//xAAcEAACAgIDAAAAAAAAAAAAAAABEQBRECExQWH/2gAIAQEAAT8hIDYzUPoggwlROh3BxP/aAAwDAQACAAMAAAAQkx//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/ED//xAAcEAEAAgMBAQEAAAAAAAAAAAABABEhMUFxUWH/2gAIAQEAAT8QxOg4L6m8Ygw2sUbJ4X5N9AXoS4AQKsZr5cVh/J//2Q==&apos;); background-size: cover; display: block;&quot;&gt;&lt;/span&gt;
  &lt;img class=&quot;gatsby-resp-image-image&quot; alt=&quot;E Book Preview&quot; title=&quot;E Book Preview&quot; src=&quot;/static/1c1c1319295d58749fdaeef267ef17d4/8d3e2/E-Book-Preview.jpg&quot; srcset=&quot;/static/1c1c1319295d58749fdaeef267ef17d4/f93b5/E-Book-Preview.jpg 300w,
/static/1c1c1319295d58749fdaeef267ef17d4/b4294/E-Book-Preview.jpg 600w,
/static/1c1c1319295d58749fdaeef267ef17d4/8d3e2/E-Book-Preview.jpg 860w&quot; sizes=&quot;(max-width: 860px) 100vw, 860px&quot; style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot;&gt;
    &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&quot;read&quot;&gt;1. Read through the change carefully&lt;/h3&gt;
&lt;p&gt;The first code review best practice is to read carefully through the code change before submitting the code for review. There is nothing worse than asking several developers to look through the code and give feedback on issues you could have fixed yourself.&lt;/p&gt;
&lt;p&gt;This wastes everyone’s time, and it might make you look bad. For future code reviews, developers may also be reluctant to review your code.&lt;/p&gt;
&lt;p&gt;So, ensure you use a code review tool or a diff tool that can highlight what changed between this and the previous version. Because these tools show you the code differently and highlight the parts that changed, it makes it easier for you to review your code yourself before sending it out.&lt;/p&gt;
&lt;p&gt;Often you will see changes that you forgot you made or missing issues highlighted you should fix before asking somebody to review.
Remember, the best time to fix issues is before you send the code out for review.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 922px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 66.66666666666666%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAQBAgX/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAAByLvJChBH/8QAGxAAAgMAAwAAAAAAAAAAAAAAAQIAAxEEEjP/2gAIAQEAAQUCNeC1eqaZyvJ3JE//xAAVEQEBAAAAAAAAAAAAAAAAAAABEP/aAAgBAwEBPwEn/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAGxAAAQQDAAAAAAAAAAAAAAAAAgABECExUWH/2gAIAQEABj8CtBWYF+ph1H//xAAbEAADAQADAQAAAAAAAAAAAAAAAREhMWFxkf/aAAgBAQABPyF9ma9wq0mLUtO5kuSMMPwufCH/2gAMAwEAAgADAAAAEPj/AP/EABYRAQEBAAAAAAAAAAAAAAAAAAEQEf/aAAgBAwEBPxBCbP/EABcRAAMBAAAAAAAAAAAAAAAAAAABESH/2gAIAQIBAT8QkcMP/8QAHBABAAMAAgMAAAAAAAAAAAAAAQARIUFxEDGh/9oACAEBAAE/EKVKsDZlK4a1FvLbfs+xTmrDYB4wZ0zRo1uxfh//2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;look through your code before submitting for review &quot;
        title=&quot;look through your code before submitting for review &quot;
        src=&quot;/static/76fbcc83e3248e15981736ccf91a5e93/b6249/careful_checking_code_review.jpg&quot;
        srcset=&quot;/static/76fbcc83e3248e15981736ccf91a5e93/f93b5/careful_checking_code_review.jpg 300w,
/static/76fbcc83e3248e15981736ccf91a5e93/b4294/careful_checking_code_review.jpg 600w,
/static/76fbcc83e3248e15981736ccf91a5e93/b6249/careful_checking_code_review.jpg 922w&quot;
        sizes=&quot;(max-width: 922px) 100vw, 922px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;figcaption class=&quot;text-center&quot;&gt;Thoroughly look through your code before submitting for review&lt;/figcaption&gt;
&lt;blockquote&gt;
&lt;p&gt;The best time to fix issues is before you send the code out for review. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=The%20best%20time%20to%20fix%20issues%20is%20before%20you%20send%20the%20code%20out%20for%20review.%20&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;small&quot;&gt;2. Aim for small, incremental changes&lt;/h3&gt;
&lt;p&gt;As a developer, you should always strive for small, incremental, and coherent changes. This code review best practice helps when working with code revision tools, such as git or SVN.&lt;/p&gt;
&lt;p&gt;Small, incremental code changes are also a crucial code review best practice, as other developers must be able to understand your code change in a short amount of time.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;10 lines of code = 10 issues.&lt;/p&gt;
&lt;p&gt;500 lines of code = “looks fine.”&lt;/p&gt;
&lt;p&gt;Code reviews.&lt;/p&gt;
&lt;p&gt;— I Am Devloper (@iamdevloper) &lt;a href=&quot;https://twitter.com/iamdevloper/status/397664295875805184?ref_src=twsrc%5Etfw&quot;&gt;November 5, 2013&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If several changes with different purposes happen within one code review, &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;the task of code reviewing becomes more difficult&lt;/a&gt;. This also decreases the ability of code reviewers to spot problems with the code. In several studies, we see that the value of the code review feedback decreases with the size of the change under review.&lt;/p&gt;
&lt;p&gt;You also want to make sure the changes are coherent. Rarely are code changes too small to be sent out. It happens, but not that often.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The quality and value of code review feedback decrease with the size of the change. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=The%20quality%20and%20value%20of%20code%20review%20feedback%20decrease%20with%20the%20size%20of%20the%20change.%20&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;cluster&quot;&gt;3. Cluster related changes&lt;/h3&gt;
&lt;p&gt;Another code review best practice is to cluster related code changes. Imagine you plan to add some new functionality, fix a bug in another function, and refactor a class. Then, each of those changes should be a separate code review. This way, you ensure the purpose of the code change is clear to the reviewers. A clear purpose makes the reviewing job much easier and increases the feedback value.&lt;br&gt;
In case you realize your code change grew too large, you can use a technique called &lt;a href=&quot;/best-practices/stacked-pull-requests/&quot;&gt;stacked pull requests to split the pull request into several smaller ones&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;description&quot;&gt;4. Provide a code review  description&lt;/h3&gt;
&lt;p&gt;One excellent investment of your time during code review is to write a description of what this code change is all about. With this note, you help the code reviewers to understand the purpose of the code change and also why you changed it. This code review best practice speeds up code review time, increases the quality and value of the feedback, and improves code review participation rates.&lt;/p&gt;
&lt;span class=&quot;gatsby-resp-image-wrapper&quot; style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1198px; &quot;&gt;
      &lt;span class=&quot;gatsby-resp-image-background-image&quot; style=&quot;padding-bottom: 66.66666666666666%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAECA//EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/aAAwDAQACEAMQAAABzTgpkFn/xAAZEAACAwEAAAAAAAAAAAAAAAABEQAQIRP/2gAIAQEAAQUCCroo4Tqz/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFREBAQAAAAAAAAAAAAAAAAAAABH/2gAIAQIBAT8BiP/EABgQAQADAQAAAAAAAAAAAAAAAAABESHR/9oACAEBAAY/Amo4xSJt/8QAGhABAQEBAQEBAAAAAAAAAAAAAREhAEExUf/aAAgBAQABPyHDfPr685KjNzlEH5eMCiZJ2B7rw0EUs7//2gAMAwEAAgADAAAAEGf/AP/EABgRAQEAAwAAAAAAAAAAAAAAAAEAITHB/9oACAEDAQE/EBLBvt//xAAWEQADAAAAAAAAAAAAAAAAAAAAASH/2gAIAQIBAT8QbF0//8QAHRABAAICAwEBAAAAAAAAAAAAAREhADFBYaFx4f/aAAgBAQABPxBxk4t9Aj3CS0MbISee8mAhodJWu8p4Ism+X8x0QAExtDeLRJQGvc//2Q==&apos;); background-size: cover; display: block;&quot;&gt;&lt;/span&gt;
  &lt;img class=&quot;gatsby-resp-image-image&quot; alt=&quot;Code review is not a puzzle&quot; title=&quot;Code review is not a puzzle&quot; src=&quot;/static/7f494804b4a0a16f2c3d599b3fa4fdd0/9888a/puzzle.jpg&quot; srcset=&quot;/static/7f494804b4a0a16f2c3d599b3fa4fdd0/f93b5/puzzle.jpg 300w,
/static/7f494804b4a0a16f2c3d599b3fa4fdd0/b4294/puzzle.jpg 600w,
/static/7f494804b4a0a16f2c3d599b3fa4fdd0/9888a/puzzle.jpg 1198w&quot; sizes=&quot;(max-width: 1198px) 100vw, 1198px&quot; style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot;&gt;
    &lt;/span&gt;
&lt;figcaption class=&quot;text-center&quot;&gt;Code reviewing isn’t a puzzle. Help reviewers focus on key issues by describing the code change.&lt;/figcaption&gt;
&lt;blockquote&gt;
&lt;p&gt;Code reviewing isn’t a puzzle. Help reviewers focus on key issues by describing the code change.  &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=Code%20reviewing%20isn%27t%20a%20puzzle.%20Help%20reviewers%20focus%20on%20key%20issues%20by%20describing%20the%20code%20change.&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Interestingly, in our studies, we observed that developers really appreciate code change descriptions.
They wish that more people would write descriptions. Counterintuitively, we saw that the same developers that wished others would prepare code review descriptions did not always include descriptions themselves.&lt;/p&gt;
&lt;p&gt;One reason for this is that when you write the code yourself, you are so involved with the code that you fall for the expert blind spot. This means you think the code change is self-explanatory. The fact is, it is not.&lt;/p&gt;
&lt;p&gt;To ease the work of writing code review descriptions, you can &lt;a href=&quot;https://www.awesomecodereviews.com/pull-request-template/&quot;&gt;use pull request templates&lt;/a&gt; to pre-populate the pull request description already with the information that is relevant to be provided.&lt;/p&gt;
&lt;p&gt;And if you do not help the reviewers to understand the code, &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;they cannot provide valuable feedback&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, write the note, even if it just says: “Updated the API endpoint to comply with security regulations”.&lt;/p&gt;
&lt;p&gt;How much easier did the job of reviewing the code just get with this note? Remember, code reviewing isn’t a puzzle.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Even if the code change seems trivial to you, add a description so reviewers know what to expect. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=Even%20if%20the%20code%20change%20seems%20trivial%20to%20you%2C%20add%20a%20description%20so%20reviewers%20know%20what%20to%20expect.&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;runtests&quot;&gt;5. Run tests before submitting a code review&lt;/h3&gt;
&lt;p&gt;Take the time to run tests for your code change. Testing isn’t only a best engineering practice, but it’s also a code review best practice. Because testing your code ensures that the code actually works before you ask for feedback.&lt;/p&gt;
&lt;p&gt;In addition, it shows that you respect the time of the code reviewers. It is not only embarrassing to send out code that obviously (as the tests show) is not working as expected, but it also kills everyone’s productivity. So, run the tests first!&lt;/p&gt;
&lt;p&gt;And don’t forget to write new tests or update existing ones so that you cover the added or changed functionality reasonably.&lt;/p&gt;
&lt;h3 id=&quot;automate&quot;&gt;6. Automate as much as possible&lt;/h3&gt;
&lt;p&gt;As one of the main challenges of code reviews is taking too long, you better follow the code review best practices of automating as much as possible.&lt;/p&gt;
&lt;p&gt;Use style checkers, syntax checkers, and other automated tools like static analysis tools to help improve the code. This way, you make sure that code reviewers concentrate on giving valuable feedback and do not need to use their time to comment on issues that can be found automatically.&lt;/p&gt;
&lt;p&gt;Similarly, choosing a &lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;good code review tool&lt;/a&gt;, and familiarizing yourself with its features helps save time and document the code review process.&lt;/p&gt;
&lt;h3 id=&quot;skip&quot;&gt;7. Skip unnecessary reviews&lt;/h3&gt;
&lt;p&gt;You read that right. You can skip code reviews.
Yet, it depends on your organizational policies, but if they permit it, you might consider skipping code reviews for trivial changes.&lt;/p&gt;
&lt;p&gt;But stop before heading out and telling your team you need no code reviews anymore.
Skipping code reviews is only advisable for trivial changes that do not change the logic, such as commenting, formatting issues, renaming of local variables, or stylistic fixes.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Skipping unnecessary code reviews boosts your productivity. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=Skipping%20unnecessary%20code%20reviews%20boosts%20your%20productivity.&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;fewerreviewers&quot;&gt;8. Do not select too many reviewers&lt;/h3&gt;
&lt;p&gt;You should select the right number of reviewers for your code change. If more than 4 people come to your mind who should review the code, I’d like you to stop right there. Because adding too many developers to code reviews does more harm than good. Also, this is a sign that your code change is too big.&lt;/p&gt;
&lt;p&gt;The main problem with adding too many developers as reviewers is that each one of them feels less responsible for giving feedback. Another issue is that adding more people than necessary decreases your team’s productivity.&lt;/p&gt;
&lt;p&gt;Some studies suggest the code review best practice of adding only &lt;a href=&quot;https://ieeexplore.ieee.org/abstract/document/6148202&quot;&gt;two active reviewers&lt;/a&gt;. At Google, only &lt;a href=&quot;/code-reviews-at-google/&quot;&gt;one reviewer reviews 75% of all code changes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For some code changes, you want additional experts, like security experts or developers from other teams, to look through the code. But, more often than not, two active reviewers are just fine.&lt;/p&gt;
&lt;p&gt;Many code review tools allow notifying developers without making them mandatory reviewers. This ensures that they stay in the loop and are aware of what is happening but removes the obligation for them to comment on your code.&lt;/p&gt;
&lt;h3 id=&quot;expectations&quot;&gt;9. Clarify review expectations&lt;/h3&gt;
&lt;p&gt;Every person that is added to the code review should know what you expect of them. Should they look for defects?&lt;/p&gt;
&lt;p&gt;Did you add them because they should familiarize themselves with the code base? Or, did you add a developer from another team that uses the functionality of the codebase and you want them to look specifically at the API?&lt;/p&gt;
&lt;p&gt;Every time you add a person as a reviewer, you should know and communicate your motivation. This code review best practice ensures that reviewers focus on the right issues, and helps fight bystander apathy.&lt;/p&gt;
&lt;h3 id=&quot;experienced&quot;&gt;10. Add experienced reviewers to get insightful feedback&lt;/h3&gt;
&lt;p&gt;Another code review best practice is to add experienced reviewers. Studies have shown that the most insightful feedback comes from reviewers that have worked on the code you are going to change before. They are the ones that give the most insightful feedback.&lt;/p&gt;
&lt;p&gt;How often a reviewer has already reviewed code influences the ability to give useful feedback. Similar, experienced and senior developers tend to give better code review feedback.&lt;/p&gt;
&lt;p&gt;But, be mindful of the workload of senior engineers, as they tend to be added as reviewers a lot. In addition, adding only developers that know the code already creates knowledge silos and hinders knowledge dissemination.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Developers that changed or reviewed pieces of the code before give the most valuable code review feedback. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=Developers%20that%20changed%20or%20reviewed%20pieces%20of%20the%20code%20before%20give%20the%20most%20valuable%20code%20review%20feedback.&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;inexperienced&quot;&gt;11. Add inexperienced reviewers for knowledge transfer&lt;/h3&gt;
&lt;p&gt;One of the code review goals is training and learning, so do not forget to include junior developers.
Junior developers might not find the most bugs during code reviews, yet, code reviews will help them ramp up and learn from the senior members of the team.&lt;/p&gt;
&lt;p&gt;Also, do not forget to add people that are not familiar with the code base but that benefit from the knowledge to allow knowledge dissemination. Having several people on the team that are familiar with the codebase helps if developers go on vacation or even leave the company. But be strategic about it. Make a plan on how many people should cover and know about certain parts of the codebase, and then use code reviews to disseminate the knowledge.&lt;/p&gt;
&lt;h3 id=&quot;notify&quot;&gt;12. Notify people that benefit from this review&lt;/h3&gt;
&lt;p&gt;For some people, like project managers or team leads, receiving notification about code reviews (without being required to do the code review) is beneficial. But, you have to make a conscious decision on whom you gonna notify. Not everybody cares or should care about your code review.&lt;/p&gt;
&lt;p&gt;Notification fatigue is real. In addition, specify your expectations so that developers know if they are notified because they should review the code, or just to keep them in the loop. Some code review tools allow specifying roles explicitly.&lt;/p&gt;
&lt;p&gt;Do not add everybody to the notification list. Only add people who benefit from the information that a code review is in the process.&lt;/p&gt;
&lt;p&gt;I have seen teams where each team member was added to each of the code reviews of the extended team by default (+70 people). This practice is like adding nobody to the list. Or, in the worst case, you have several of your engineers spending their time looking through hundreds of code reviews to figure out if it’s relevant for them.&lt;/p&gt;
&lt;h3 id=&quot;headsup&quot;&gt;13.  Give reviewers a heads-up before the review&lt;/h3&gt;
&lt;p&gt;An effective code review best practice is to let your co-workers know ahead of time that they will receive a code review soon.
This code review best practice reduces turn-around times substantially.&lt;/p&gt;
&lt;p&gt;So, let them know a code review is coming their way as soon as possible.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Giving people a heads-up that a code review is on its way can speed up review time. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=Giving%20people%20a%20heads-up%20that%20a%20code%20review%20is%20on%20its%20way%20can%20speed%20up%20review%20time.%20&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;beopen&quot;&gt;14. Be open to the suggested changes&lt;/h3&gt;
&lt;p&gt;Receiving unexpected comments or feedback might make you tense and defensive. Try to prepare yourself mentally and work on your ability to be open to suggestions and different viewpoints. Always start with the assumption that the reviewer had the best intention.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1054px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 66.66666666666666%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAMCBP/EABUBAQEAAAAAAAAAAAAAAAAAAAEC/9oADAMBAAIQAxAAAAHmxOBcQx//xAAbEAACAgMBAAAAAAAAAAAAAAABAgMSABAhMf/aAAgBAQABBQJCrgw0w+9hWx1//8QAFhEBAQEAAAAAAAAAAAAAAAAAAQIQ/9oACAEDAQE/AZgM/8QAFREBAQAAAAAAAAAAAAAAAAAAARD/2gAIAQIBAT8BZ//EABwQAAEEAwEAAAAAAAAAAAAAAAEAAhAhEjFBYf/aAAgBAQAGPwI8cVe4GJt3V7H/xAAbEAEAAgIDAAAAAAAAAAAAAAABABEhQVFhcf/aAAgBAQABPyFzHEzW4Qbja4NIvbBDUt+pbzP/2gAMAwEAAgADAAAAEIff/8QAFxEBAAMAAAAAAAAAAAAAAAAAAAEhQf/aAAgBAwEBPxDDtL//xAAWEQEBAQAAAAAAAAAAAAAAAAABEDH/2gAIAQIBAT8QLk//xAAbEAEAAwEAAwAAAAAAAAAAAAABABEhQTFRcf/aAAgBAQABPxBdtehNHtHGJ7BaTPX3rCU0B8bDjIWikrhNNttW3Gx1P//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Person being defensive due to code review feedback&quot;
        title=&quot;Person being defensive due to code review feedback&quot;
        src=&quot;/static/a16835cff4a13dbef27cf0751bb5734a/3694a/codeauthor_defense.jpg&quot;
        srcset=&quot;/static/a16835cff4a13dbef27cf0751bb5734a/f93b5/codeauthor_defense.jpg 300w,
/static/a16835cff4a13dbef27cf0751bb5734a/b4294/codeauthor_defense.jpg 600w,
/static/a16835cff4a13dbef27cf0751bb5734a/3694a/codeauthor_defense.jpg 1054w&quot;
        sizes=&quot;(max-width: 1054px) 100vw, 1054px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;figcaption class=&quot;text-center&quot;&gt;Don’t be defensive if confronted with unexpected feedback.&lt;/figcaption&gt;
&lt;p&gt;If some feedback made you uncomfortable, try to sort things out as soon as possible.
Sometimes it is a good idea to have more personal face-to-face conversations to resolve some issues.&lt;/p&gt;
&lt;h3 id=&quot;gratitude&quot;&gt;15. Show respect and gratitude to the reviewers&lt;/h3&gt;
&lt;p&gt;Code reviews rise and fall with the team’s feedback culture. As a code author, it is a code review best practice to show gratitude and value the received feedback. Make sure to carefully consider the reviewers’ feedback and communicate throughout the feedback cycle.&lt;/p&gt;
&lt;p&gt;Tell the reviewers which actions you took and which decisions you made because of the received feedback in a respectful manner.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Code review rises and falls with the quality of the team’s feedback culture. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=Code%20review%20rises%20and%20falls%20with%20the%20quality%20of%20the%20team%27s%20feedback%20culture.&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But, creating a great feedback culture is a two-way street. Naturally, code reviewers influence the culture a lot.
So let us look closely at this best practice for code reviewers.&lt;/p&gt;
&lt;h2 id=&quot;practicesreviewers&quot;&gt;Code Review Best Practices for Code Reviewers&lt;/h2&gt;
&lt;p&gt;Being asked to give feedback on a code review is an honor,
so you want to make sure you know &lt;a href=&quot;https://www.michaelagreiler.com/great-code-review-feedback/&quot;&gt;how to give valuable code review feedback&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;During code reviews, you can not only demonstrate your skills and knowledge but also mentor other developers and contribute to the team’s success. Nothing worse than investing time in &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;code reviews and not getting valuable feedback&lt;/a&gt;.&lt;/p&gt;
&lt;br&gt;
&lt;div class=&quot;row code-review-book-sign-up justify-content-md-center p-5 border&quot;&gt;
&lt;div class=&quot;col col-lg-6 col-sm-12&quot;&gt;
&lt;p&gt;
I prepared an exclusive &lt;a href=&quot;https://www.michaelagreiler.com/code-review-e-book/&quot;&gt;Code Review e-Book&lt;/a&gt; for my e-mail subscribers packed with all code review best practices, a code review checklist and other great insights and summaries about code reviews. Get the 20-page insights to code reviews now. &lt;a href=&quot;#newsletterId&quot;&gt;Get it now&lt;/a&gt;.
&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;col-lg-4  float-right&quot; style=&quot;max-width:450px;&quot;&gt;&lt;span class=&quot;gatsby-resp-image-wrapper&quot; style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 860px; &quot;&gt;
      &lt;span class=&quot;gatsby-resp-image-background-image&quot; style=&quot;padding-bottom: 65.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAIEAf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAGu5sGAT//EABoQAAEFAQAAAAAAAAAAAAAAABEAAQMQEhP/2gAIAQEAAQUCaaTW26IICv/EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABoQAAICAwAAAAAAAAAAAAAAABARABIhMUH/2gAIAQEABj8CWJXuyx//xAAcEAACAgIDAAAAAAAAAAAAAAABEQBRECExQWH/2gAIAQEAAT8hIDYzUPoggwlROh3BxP/aAAwDAQACAAMAAAAQkx//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/ED//xAAcEAEAAgMBAQEAAAAAAAAAAAABABEhMUFxUWH/2gAIAQEAAT8QxOg4L6m8Ygw2sUbJ4X5N9AXoS4AQKsZr5cVh/J//2Q==&apos;); background-size: cover; display: block;&quot;&gt;&lt;/span&gt;
  &lt;img class=&quot;gatsby-resp-image-image&quot; alt=&quot;E Book Preview&quot; title=&quot;E Book Preview&quot; src=&quot;/static/1c1c1319295d58749fdaeef267ef17d4/8d3e2/E-Book-Preview.jpg&quot; srcset=&quot;/static/1c1c1319295d58749fdaeef267ef17d4/f93b5/E-Book-Preview.jpg 300w,
/static/1c1c1319295d58749fdaeef267ef17d4/b4294/E-Book-Preview.jpg 600w,
/static/1c1c1319295d58749fdaeef267ef17d4/8d3e2/E-Book-Preview.jpg 860w&quot; sizes=&quot;(max-width: 860px) 100vw, 860px&quot; style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot;&gt;
    &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;h3 id=&quot;respectfulfeedback&quot;&gt;16. Give respectful and constructive feedback&lt;/h3&gt;
&lt;p&gt;Even though it reads like a no-brainer, code reviews do put the code author in a vulnerable position, so you must be considerate of that.&lt;br&gt;
Your job is to give &lt;a href=&quot;/respectful-constructive-code-review-feedback/&quot;&gt;constructive and valuable feedback&lt;/a&gt; but also to do so in a respectful manner.&lt;/p&gt;
&lt;p&gt;Especially when you use a &lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;code review tool&lt;/a&gt; and give feedback in a written form, please reflect on how and what kind of feedback you give.
It is just so easy to hurt someone’s feelings – especially in written form. Too often, time pressure might make you give a sloppy answer that can be misinterpreted.&lt;/p&gt;
&lt;h3 id=&quot;inperson&quot;&gt;17. Talk in person if necessary&lt;/h3&gt;
&lt;p&gt;Code review tools and chat tools allow us to communicate with our peers asynchronously and effortlessly.
But, there are quite a few situations where proper human interaction, either face-to-face or via voice/video, cannot be beaten.&lt;/p&gt;
&lt;p&gt;Complex issues, for example, can be much more efficient and positively resolved once you hop over to your colleague or call her and discuss it personally. The same holds true for contentious issues or sensitive matters.&lt;/p&gt;
&lt;p&gt;Maybe it is a better strategy to write a private email or seek a personal discussion with the code author if you think you might hurt some feelings are make the engineer lose the face. So, whenever you face a complex issue or might hurt some feelings, rethink your communication channels and act accordingly.&lt;/p&gt;
&lt;h3 id=&quot;document&quot;&gt;18. Document code review decisions&lt;/h3&gt;
&lt;p&gt;Even though less traceable conversations, such as face-to-face or video calls, can make a big difference in team dynamics, it is important to document the discussion.
It is a best practice to record and track the code review outcome for future reference by using traceable &lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;tools such as the code review tool&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The code review tool is the right communication channel for all simple matters, as it allows the whole team to follow along and enables them to look up decisions and understand code development after the fact.&lt;/p&gt;
&lt;p&gt;Even if you prefer to do code reviews synchronously, take the time to put a few notes in a code review tool to let also others (or your future self) know the outcome of a discussion.&lt;/p&gt;
&lt;div&gt;
&lt;span class=&quot;gatsby-resp-image-wrapper&quot; style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1152px; &quot;&gt;
      &lt;span class=&quot;gatsby-resp-image-background-image&quot; style=&quot;padding-bottom: 66.66666666666666%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAEF/8QAFgEBAQEAAAAAAAAAAAAAAAAAAwAB/9oADAMBAAIQAxAAAAHSgKRFv//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAQUCX//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEABj8CX//EABkQAAMAAwAAAAAAAAAAAAAAAAABERAxQf/aAAgBAQABPyG0pEcw9n//2gAMAwEAAgADAAAAEI8v/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPxA//8QAGhAAAgMBAQAAAAAAAAAAAAAAASEAEVEQ8P/aAAgBAQABPxDBDTDYIWN2bQimcAV+HL//2Q==&apos;); background-size: cover; display: block;&quot;&gt;&lt;/span&gt;
  &lt;img class=&quot;gatsby-resp-image-image&quot; alt=&quot;traces in sand symbolizing code review feedback traces&quot; title=&quot;traces in sand symbolizing code review feedback traces&quot; src=&quot;/static/6fd63b8306904eec2e2471e7d169e2b5/5ef17/traces.jpg&quot; srcset=&quot;/static/6fd63b8306904eec2e2471e7d169e2b5/f93b5/traces.jpg 300w,
/static/6fd63b8306904eec2e2471e7d169e2b5/b4294/traces.jpg 600w,
/static/6fd63b8306904eec2e2471e7d169e2b5/5ef17/traces.jpg 1152w&quot; sizes=&quot;(max-width: 1152px) 100vw, 1152px&quot; style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot;&gt;
    &lt;/span&gt;
&lt;figcaption class=&quot;text-center&quot;&gt;Leaving traces about your decisions and changes helps to understand code evolvement&lt;/figcaption&gt;
&lt;/div&gt;
&lt;h3 id=&quot;explain&quot;&gt;19. Explain your point of view&lt;/h3&gt;
&lt;p&gt;Let’s be honest; having your code criticized isn’t something the code author will enjoy. So, you must be thoughtful and explain your reservation in a polite, constructive, and friendly way.&lt;/p&gt;
&lt;p&gt;Explaining the reasons behind your feedback and the suggested changes not only helps the code author to learn and grow but also helps the author to understand your viewpoint. It also promotes an ongoing dialog with the author.&lt;/p&gt;
&lt;p&gt;Tell the code author exactly what she has to do to get the change accepted by you.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you criticize a code change, explain precisely what you expect so that you approve the code review. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=If%20you%20criticize%20a%20code%20change%2C%20explain%20precisely%20what%20you%20expect%20so%20that%20you%20approve%20the%20code%20review.&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;norejections&quot;&gt;20. Make code review rejections exceptions&lt;/h3&gt;
&lt;p&gt;Especially in a company and closed-source setting, code review rejections should be a very rare exception. It is a significant red flag if developers cannot produce code that will make it into the codebase. The ideas of rejection stem from the open-source setting. Here, it is normal for outside developers might suggest changes that do not align with the vision or roadmap of the open-source project as they are not involved. Also, because everyone is allowed to submit code, it frequently happens that the submitted code is not in an acceptable state or of quality.&lt;/p&gt;
&lt;p&gt;Both should not happen in an environment where people work closely with each other. Here, developers should know the roadmap, and the tickets they work on should correspond with the vision. Also, after an onboarding period, even junior developers should be able to write code that passes the internal code quality standards – at least after some constructive code review feedback. If this is not the case, project management and the learning culture need to be revisited.&lt;/p&gt;
&lt;h3 id=&quot;routine&quot;&gt;21. Integrate code review into your daily routine&lt;/h3&gt;
&lt;p&gt;Some of the biggest challenges during code reviews, for both the code author and the code reviewer, are time constraints.&lt;/p&gt;
&lt;p&gt;As a reviewer, you might find it challenging to take time out of your day to review the code of your peers. But code reviews can be very beneficial to you and the team if done in the right way.&lt;/p&gt;
&lt;p&gt;To ensure you stay productive, structure your day-to-day business in a way that you set dedicated time aside just for doing code reviews. For example, plan to work on code reviews every day from 11 to 12 AM.&lt;/p&gt;
&lt;p&gt;This way, you make sure you can account for the time for code reviews and also make it an expected activity for you and your team. This schedule will come in handy every time you have a reflection on your work progress or an evaluation of your work.&lt;/p&gt;
&lt;h3 id=&quot;noswitching&quot;&gt;22. Reduce context switching as it kills productivity&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.michaelagreiler.com/developer-productivity/&quot;&gt;Switching from one task to another is costly.&lt;/a&gt; Knowing you do not stop whatever you do every time a code review comes along your way ensures you can work more focused.&lt;/p&gt;
&lt;p&gt;Which time slots work depends on your workload, the number of code reviews you have to perform, as well as on the time those reviews normally come in. In some settings, your team benefits from two (shorter) scheduled reviewing times, such as in the morning and before you leave the office. This way, your peers do not have to wait for your feedback too long.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1024px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 50%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAA7EAAAOxAGVKw4bAAACq0lEQVQozx3R+VIaBwDA4X2FVjqaWI+AoiCHsICAIMtyrAu7CywEM4KZaCJiR2Ob2hy2qdKk007SdjJjjWlrcJkUD/qQv07yAt8/n3DSe8Vp/zUfLs64o6vocpR6IU2jlGOzUWLjjkFmUaSQiaMpSSpahlh4HtHnRvTPEfC5mHNNMzn+JePjYwhnF8d0r4/pX51T1xQ0OUatKNM0Fdp3Te6vGmSTYYq5BIYqUS0pJKIikYCHBdFHRPTh97qYckwyOTGGYF29wxq85eLKolrMU5Dj1PU8K0aOjdUSrbUK2aUIWn6JciFDvVJASiwgLUZIJSLEo0HEeQ+zzimmHLcQetfv6A1O6V+eU1GzKFKEkpLC6/Xgc7tomMsocgx9OY2hprldVslKcUxDRVOzxCIBwiE/7lkn01N2BGtwijU4+QQWM0nMYoamqZPzz7JrSNyvLZNOhGg/WOPF4QHffbtDe/Me2611nj5+xM5XWzzc3Wbv4Q7zfi/C+fUJ1uCYD//+g5ZJ8UvnkD9edOjoMt0nWxw92ia1KFIx8txdrdE5PODox2c82d/j4Nk+Px09p1o1EIM+3O4ZhPeXb+gO3mD1Ttlrtfj5+QH7W5t83bzHr601OrttUq4xdCmIWVbZerBGLbfERilHo5xD1/Kk4kGcjjGc03aEv/qv+fvyFVbvLc1igXpWYrt5m9bGOq3NGvvrVWS7jVLS/Qn8uCxHg2RjIsWkn3QqiuibYfTGMKOjNxGOey856b/kvfUnYY+HkHsGRZYoL2d5/PQb2o0VZIcNIzlH2cizUtNYcNoJ3rSRDtpJJkLMu+zYPv+MkZERhN/OfuD37vdc/9fFLJnYHbcI+b3kk3GUbJ6AP4A4MYS25EYvpqmZKouuCWSvjVRwnEjYi292ki+GhhgeHuZ/E3KJGxUmasgAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;a person working a bit lost at a computer&quot;
        title=&quot;a person working a bit lost at a computer&quot;
        src=&quot;/static/59024959c937d7a68044f6f48c593def/2bef9/productivity.png&quot;
        srcset=&quot;/static/59024959c937d7a68044f6f48c593def/5a46d/productivity.png 300w,
/static/59024959c937d7a68044f6f48c593def/0a47e/productivity.png 600w,
/static/59024959c937d7a68044f6f48c593def/2bef9/productivity.png 1024w&quot;
        sizes=&quot;(max-width: 1024px) 100vw, 1024px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;figcaption class=&quot;text-center&quot;&gt;Context switching because of code reviews kills productivity&lt;/figcaption&gt;
&lt;blockquote&gt;
&lt;p&gt;Context switching kills productivity. So have dedicated code review times. #codereview &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=%20Context%20switching%20kills%20productivity.%20So%20have%20dedicated%20code%20review%20times.%20%23codereview%20&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;timelyfeedback&quot;&gt;23. Give feedback timely&lt;/h3&gt;
&lt;p&gt;Do not jump right into a code review whenever the notifications pop up because of context-switching costs. Still, it has several advantages for you and the code author to review the code in a timely matter.&lt;/p&gt;
&lt;p&gt;It is essential to give feedback as soon as possible. Also, Google recommends fast code reviews in &lt;a href=&quot;https://google.github.io/eng-practices/review/reviewer/speed.html&quot;&gt;Google’s code review best practice guideline&lt;/a&gt;. This ensures that you do not block the code author by having them wait for feedback. Also, if the author has to wait too long, it becomes harder for her or him to remember the changes and incorporate the feedback. Remember, long waiting times are a number one &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;code review challenge&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Being one of the first reviewers (especially if there are quite a few) also ensures your effort in looking through the code actually adds value. If you are the fifth person inspecting the code, chances are you will not add new insights anymore. If that happens frequently, implement the code review best practice for selecting fewer reviewers.&lt;/p&gt;
&lt;h3 id=&quot;timezones&quot;&gt;24. Consider the time zones of your peers&lt;/h3&gt;
&lt;p&gt;Nothing is more frustrating than if a developer in another time zone reviews your code at the ‘wrong’ time. But what is the wrong time? If you have a big time zone difference, the wrong time to review a change is the time that stretches the time zone differences even more.&lt;/p&gt;
&lt;p&gt;So, as a best practice for code reviews, when designing your personal code review schedule, check the time zones of your peers. It might make a big difference for someone if you dedicate half an hour in the morning instead of in the afternoon to do code reviews, while for yourself, it might not be that big of a deal.&lt;/p&gt;
&lt;h3 id=&quot;teameffort&quot;&gt;25. Have your team play along&lt;/h3&gt;
&lt;p&gt;Code review is a team effort. If it’s only you that looks at reviews in time or &lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;systematically with checklists&lt;/a&gt;, you are not getting the complete benefits of code reviews. Instead, make sure everyone on the team knows the &lt;a href=&quot;/code-reviews-at-microsoft/&quot;&gt;benefits&lt;/a&gt;, &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;challenges&lt;/a&gt;, and code review best practices.&lt;/p&gt;
&lt;p&gt;Especially for scheduling and coordination, there are &lt;a href=&quot;/workshops/&quot;&gt;effective habits that are easy to learn&lt;/a&gt; but help with accountability and workload balance. For example, the “give-one-take-one” practice.&lt;/p&gt;
&lt;p&gt;The “give-one-take-one” practice means that every time you send out a code review, you do a code review for your colleagues. If you combine this with the code review best practice of sending out small code changes to review, the team’s workload will be balanced, and code reviews done in a timely manner.&lt;/p&gt;
&lt;h3 id=&quot;reviewoften&quot;&gt;26. Review often, not in a big-bang fashion&lt;/h3&gt;
&lt;p&gt;Research shows you give better code review feedback if you review often and, therefore, fewer changes at a time. That means that you do not wait until several code reviews pile up to look through them in one go. Instead, you stick to your schedule and review one code review (or even parts of one if it is a larger code review) at a time.&lt;/p&gt;
&lt;p&gt;If code reviews are too large and take too long, you can suggest the code review best practices for small, incremental, and coherent changes to the code review authors. Another approach is to ask the code author to split the review into smaller changes, for example, &lt;a href=&quot;/best-practices/stacked-pull-requests/&quot;&gt;using stacked pull requests&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Give better quality feedback to code reviews by not letting them pile up. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;#x26;text=Give%20better%20quality%20feedback%20to%20code%20reviews%20by%20not%20letting%20them%20pile%20up.&amp;#x26;via=mgreiler&amp;#x26;related=mgreiler&quot;&gt;Click To Tweet&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;coreissues&quot;&gt;27. Focus on core issues; do less nit-picking&lt;/h3&gt;
&lt;p&gt;Your goal as a reviewer should be to help with core issues, such as bugs, architectural problems, structural problems, or problems that will lead to maintainability issues.&lt;/p&gt;
&lt;p&gt;Obviously, if you see typos, badly named variables, or styling issues, you might also point that out. Still, this is not your main task, and understandably, over-discussing &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;minor issues isn’t valuable to code authors.&lt;/a&gt; So, follow the code review best practice to focus on core issues, and show when you nitpick (for example, with the appreciation NIT).&lt;/p&gt;
&lt;h3 id=&quot;testsfirst&quot;&gt;28. Start by reviewing test code first&lt;/h3&gt;
&lt;p&gt;While some developers would not even review test code, you follow the &lt;a href=&quot;https://github.com/mgreiler/awesome-code-review-research&quot;&gt;research in code reviews&lt;/a&gt; that &lt;a href=&quot;https://sback.it/publications/icse2019a.pdf&quot;&gt;suggests that starting your review with test code&lt;/a&gt; is a good idea. Also in the AI era, reviewing test code has gotten a completely different value. This is your safety net, and as we want to embrace the speed-ups GenAI can give us, we have to take even more care of our guardrails.&lt;/p&gt;
&lt;p&gt;Also when you review test code first, you kill one bird with two stones.
Test cases document the use cases of the code. Thus, they help you form a mental model of what this code is all about. This means you get a better understanding of the test code and can give more valuable feedback. In addition, it lets you focus on the test code itself. This way, you ensure your test code is also of high quality and covers the functionality in a reasonable way. Having a high-quality test code base is a great investment. It increases the maintainability of the code, decreases manual testing costs, and helps to reduce post-production defects.&lt;/p&gt;
&lt;h3 id=&quot;checklists&quot;&gt;29. Use code review checklists&lt;/h3&gt;
&lt;p&gt;Another code review best practice is to use a systematic approach for code reviews. &lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;A code review checklist&lt;/a&gt; can speed up and improve your code review performance.
Instead of making one from scratch, download a ready-made list and customize it to fit your team’s practices and your needs.&lt;/p&gt;
&lt;p&gt;Be sure to also look for a checklist that is tailored to your technology stack.
You can also use &lt;a href=&quot;https://github.com/mgreiler/awesome-code-review-checklists&quot;&gt;checklists focusing on specific aspects&lt;/a&gt; such as accessibility or &lt;a href=&quot;/checklists/secure-code-review-checklist/&quot;&gt;security&lt;/a&gt; not only to find problems with your code.
In addition, code review checklists make for a great learning tool that helps you improve your skills.
Having a code review checklist also builds a shared understanding within the team of what is important, and reduces conflicts, disagreements and prolonged discussions during code reviews.&lt;/p&gt;
&lt;p&gt;To help you implement this practice, I reworked my code review checklist into a beautiful printable PDF version.
This checklist is the highest-rated general code review checklist on GitHub, and today you can &lt;a href=&quot;https://7858485475626.gumroad.com/l/code-review-checklist&quot;&gt;download it for FREE&lt;/a&gt; and make your code reviews more systematic.&lt;/p&gt;
&lt;h3 id=&quot;bias&quot;&gt;30.  Fight code review bias&lt;/h3&gt;
&lt;p&gt;Unfortunately, code reviews and especially judgments during code reviews can be clouded by bias. For example, a &lt;a href=&quot;https://cacm.acm.org/magazines/2022/3/258909-the-pushback-effects-of-race-ethnicity-gender-and-age-in-code-review/fulltext&quot;&gt;study at Google&lt;/a&gt; showed that developers that identify as women get more pushback during code reviews than peers that identify as men. Also, other studies look at how race, gender, ethnicity, and age influence the code review experience. And also, these studies find that pushback, code review rejections, and also the scrutiny with which reviews are performed are biased based on those factors. For example, a large-scale study on code review participation and acceptance rate in open source showed that code written by developers that appear to be black is more likely to be rejected than code written by developers who appear to be white. As such, make sure you are aware of the existing bias during code review and proactively take actions (such as reviews of reviews) to reduce bias, harassment, and prejudice in code reviews.&lt;/p&gt;
&lt;h2&gt;Summary of code review best practices&lt;/h2&gt;
&lt;p&gt;Now that you know 30 best practices for code reviews, I wonder how many of those you already implement in your team.
Tell me your score, and also which code review best practices you haven’t adopted yet and why. You can &lt;a href=&quot;https://twitter.com/mgreiler&quot;&gt;find me on Twitter at twitter.com/mgreiler&lt;/a&gt;.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “30 Proven Code Review Best Practices”: &lt;a href=&quot;https://www.michaelagreiler.com/code-review-best-practices/&quot;&gt;https://www.michaelagreiler.com/code-review-best-practices/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2026-07-23T09:59:30+01:00&quot;&gt;July 23, 2026&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[10 Best Code Review Tools In 2024]]></title><description><![CDATA[Let’s learn about the 10 best code review tools in 2024, and which features stand out for each of the code review tools.
While following…]]></description><link>https://www.awesomecodereviews.com/tools/best-code-review-tools/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/tools/best-code-review-tools/</guid><pubDate>Tue, 17 Jan 2023 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Let’s learn about the 10 best code review tools in 2024, and which features stand out for each of the code review tools.
While following &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practices&lt;/a&gt; make code reviews easier,
choosing the right tool for the job is as important.
By looking at the pros and cons of each tool, I, therefore, help you decide which code review tool is the best for you.
Finally, I give you a glimpse into new and upcoming code review tools, that can nicely complement
the review functionality of code review tools such as GitHub or GitLab.&lt;/p&gt;
&lt;p&gt;Here is what awaits you.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#10-best-code-review-tools&quot;&gt;10 Best Code Review Tools&lt;/a&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;#github&quot;&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#gitlab&quot;&gt;GitLab&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#azure&quot;&gt;Azure DevOps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#bitbucket&quot;&gt;Bitbucket&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#crucible&quot;&gt;Crucible&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#codestream&quot;&gt;CodeStream&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#review-board&quot;&gt;Review Board&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#gerrit&quot;&gt;Gerrit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#jetbrains-space&quot;&gt;Jetbrains Space&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#review-assistant&quot;&gt;Review Assistant&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#other-tools&quot;&gt;Other emerging code review tools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#faq&quot;&gt;Frequently Asked Questions (FAQ) about code review tools&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#why-code-review&quot;&gt;Why is code review important?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#why-tool&quot;&gt;Why should you use a code review tool?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#how-choose-tool&quot;&gt;How to choose a code review tool?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#ai-tools&quot;&gt;AI-powered code review tools&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;10 Best Code Review Tools&lt;/h2&gt;
&lt;p&gt;The list of code review tools is based on the popularity of the tools.
In addition, I’ll highlight a few new code review tools that
will change how we do code reviews today.&lt;/p&gt;
&lt;p&gt;Other handy articles are my post about &lt;a href=&quot;/tools/ai-code-review-tools/&quot;&gt;AI code review tools&lt;/a&gt;,
and the one about &lt;a href=&quot;/automation/automated-code-reviews/&quot;&gt;best tools for static and dynamic analysis&lt;/a&gt;
during code reviews.&lt;/p&gt;
&lt;h3 id=&quot;github&quot;&gt;1. GitHub&lt;/h3&gt;
&lt;hr&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/b82947ef034129e847b582648f55ba21/7eaee/github_pr_overview.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 49%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAKABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAEF/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/2gAMAwEAAhADEAAAAd2wUJ//xAAVEAEBAAAAAAAAAAAAAAAAAAAQAf/aAAgBAQABBQJr/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQAGPwJf/8QAGRABAAIDAAAAAAAAAAAAAAAAAAExEBEh/9oACAEBAAE/IabdWhOP/9oADAMBAAIAAwAAABAg3//EABYRAAMAAAAAAAAAAAAAAAAAAAEQMf/aAAgBAwEBPxAxf//EABURAQEAAAAAAAAAAAAAAAAAABAR/9oACAECAQE/EKf/xAAbEAEAAgMBAQAAAAAAAAAAAAABABEhQXEQUf/aAAgBAQABPxChhTk3KfJktUHPFp2E/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Overview Github PR Diff&quot;
        title=&quot;Overview Github PR Diff&quot;
        src=&quot;/static/b82947ef034129e847b582648f55ba21/e5166/github_pr_overview.jpg&quot;
        srcset=&quot;/static/b82947ef034129e847b582648f55ba21/f93b5/github_pr_overview.jpg 300w,
/static/b82947ef034129e847b582648f55ba21/b4294/github_pr_overview.jpg 600w,
/static/b82947ef034129e847b582648f55ba21/e5166/github_pr_overview.jpg 1200w,
/static/b82947ef034129e847b582648f55ba21/d9c39/github_pr_overview.jpg 1800w,
/static/b82947ef034129e847b582648f55ba21/df51d/github_pr_overview.jpg 2400w,
/static/b82947ef034129e847b582648f55ba21/7eaee/github_pr_overview.jpg 2508w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;GitHub&lt;/a&gt; is a cloud-based repository hosting and management platform that allows developers to collaborate effectively.&lt;/p&gt;
&lt;p&gt;It has a built-in code review tool that code authors use to seek &lt;a href=&quot;/respectful-constructive-code-review-feedback/&quot;&gt;feedback from reviewers&lt;/a&gt;.
This allows a seamless review process within GitHub when developers introduce new changes to code.&lt;/p&gt;
&lt;p&gt;GitHub’s code review tool lets developers initiate and respond to reviews in simple steps.
After creating a pull request, the author assigns one or more reviewers.
GitHub allows the author to describe the code changes and areas on which the reviewer should focus.
Then, reviewers can comment, approve or request further changes from the author.&lt;/p&gt;
&lt;p&gt;While GitHub lacks native automated code check features, it integrates with external ones to provide a more extensive review experience.
For example, &lt;a href=&quot;/automation/datadog-code-security/&quot;&gt;Datadog Static Code Analysis&lt;/a&gt; can report security and quality findings as
inline pull-request comments and provide suggested fixes for supported rules.&lt;/p&gt;
&lt;p&gt;GitHub also provides a code scanner, &lt;a href=&quot;/automation/codeql/&quot;&gt;CodeQL&lt;/a&gt;, that helps developers identify vulnerabilities.
Developers can also use GitHub Actions to enable CI/CD workflow and third-party integrations natively on GitHub.
Recently, GitHub also added a new feature which enables &lt;a href=&quot;https://github.blog/2023-01-10-introducing-required-workflows-and-configuration-variables-to-github-actions/&quot;&gt;required workflows&lt;/a&gt; to be run and passed during CI/CD.
Alternatively, developers integrate external code scanners to set up a robust CI/CD pipeline that runs extensive tests and automatically merges the changes upon success.&lt;/p&gt;
&lt;p&gt;Despite the attractive advantages, GitHub is not the best code review tool when working with large repositories.
For example, GitHub strictly recommends keeping the size of a repository below 5GB, while &lt;a href=&quot;#7-gerrit&quot;&gt;Gerrit&lt;/a&gt; has no problem managing a 1TB repository.
In such cases, Gerrit is the better option.
GitHub also proved hard to navigate code reviews when comment threads are large, or when there are many or large files.
The need of expanding and collapsing comments, as well as diff-views of files,
is time-consuming and annoying and often leads to overlooking issues.&lt;/p&gt;
&lt;p&gt;GitHub has a free plan for individual users, offering yearly teams subscription from $44 per user.
GitHub is cloud-based but also deployable on-premise with GitHub Enterprise Server.&lt;/p&gt;
  &lt;h4&gt;Github&apos;s Pros:&lt;/h4&gt;
  &lt;ul&gt;
    &lt;li&gt; GitHub has a large, very lively marketplace and provides many add-ons to enhance code review.&lt;/li&gt;
    &lt;li&gt; It allows teams to set review policies, including setting permissions and automatically assigning reviewers from teammates. &lt;/li&gt;
    &lt;li&gt; Code review is a straightforward process in the GitHub environment.&lt;/li&gt;
    &lt;li&gt; It offers detailed oversight of changes in code files.&lt;/li&gt;
    &lt;li&gt; GitHub’s threaded comments allow teams to follow up and revisit past reviews easily. &lt;/li&gt;
    &lt;li&gt; It enables CI/CD workflow with GitHub Actions and vulnerability scans.&lt;/li&gt;
  &lt;/ul&gt;
  &lt;h4&gt;Github&apos;s Cons:&lt;/h4&gt;
  &lt;ul&gt;
    &lt;li&gt; GitHub lacks stability when supporting review workflow involving large or multiple files and comments. &lt;/li&gt;
    &lt;li&gt; Reviews with many files, or large files also require the reviewer to collapse and expand files, complicating the review process. &lt;/li&gt;
    &lt;li&gt; It is limited to Git repositories.&lt;/li&gt;
    &lt;li&gt; Resolving merge conflicts using the web interface is tedious and error-prone.&lt;/li&gt;
  &lt;/ul&gt;
&lt;h3 id=&quot;gitlab&quot;&gt;2. GitLab&lt;/h3&gt;
&lt;hr&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/0f4ace3a233488fee83b6db0f588e1db/e8625/gitlab_pr_overview.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 47.333333333333336%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAJABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAECBf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAHvRJNIP//EABYQAQEBAAAAAAAAAAAAAAAAABABMf/aAAgBAQABBQJuH//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEABj8CX//EABgQAQEAAwAAAAAAAAAAAAAAAAEQACEx/9oACAEBAAE/IXRhyhP/2gAMAwEAAgADAAAAEHzv/8QAFhEBAQEAAAAAAAAAAAAAAAAAAAER/9oACAEDAQE/ELWv/8QAFREBAQAAAAAAAAAAAAAAAAAAABH/2gAIAQIBAT8QV//EABoQAQADAAMAAAAAAAAAAAAAAAEAEBEhMWH/2gAIAQEAAT8QDwqxKN2a+1dCv//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Overview GitLab Merge Request Diff&quot;
        title=&quot;Overview GitLab Merge Request Diff&quot;
        src=&quot;/static/0f4ace3a233488fee83b6db0f588e1db/e5166/gitlab_pr_overview.jpg&quot;
        srcset=&quot;/static/0f4ace3a233488fee83b6db0f588e1db/f93b5/gitlab_pr_overview.jpg 300w,
/static/0f4ace3a233488fee83b6db0f588e1db/b4294/gitlab_pr_overview.jpg 600w,
/static/0f4ace3a233488fee83b6db0f588e1db/e5166/gitlab_pr_overview.jpg 1200w,
/static/0f4ace3a233488fee83b6db0f588e1db/d9c39/gitlab_pr_overview.jpg 1800w,
/static/0f4ace3a233488fee83b6db0f588e1db/df51d/gitlab_pr_overview.jpg 2400w,
/static/0f4ace3a233488fee83b6db0f588e1db/e8625/gitlab_pr_overview.jpg 3352w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Like GitHub, &lt;a href=&quot;https://gitlab.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;GitLab&lt;/a&gt; is a Git-only repository platform that lets teams collaborate remotely, and also offers a built-in code review tool.
It offers developers free private repositories, an attractive feature for those with security concerns about publicly-accessible ones.
However, GitLab operates with very different principles and features than its major rival.
GitLab prioritizes stability and is built around a comprehensive CI/CD pipeline, while GitHub focuses on speed.&lt;/p&gt;
&lt;p&gt;When making code changes on GitLab, the platform creates separate stable branches beyond the master branch.
This allows QA teams to run multi-step testing on the branches. Meanwhile, GitHub merges changes directly to the master branch while allowing developers to roll back the changes quickly.&lt;/p&gt;
&lt;p&gt;GitLab also offers flexibility when setting up the code review requirements.
You can specify the number of approvals needed for each request and determine qualified reviewers to grant such approvals.
For example, you can prevent users who made commits from approving code reviews.&lt;/p&gt;
&lt;p&gt;In 2021, GitLab introduced a new &lt;a href=&quot;https://docs.gitlab.cn/14.0/ee/user/project/merge_requests/getting_started.html&quot;&gt;‘Reviewers’&lt;/a&gt; role alongside the existing ‘Assignees’ to better differentiate participant roles in the review stages.
Assignees are developers directly accountable for the merging, while Reviewers are partially involved in the process.
Now, GitLab allows you to submit merge requests directly from Visual Studio Code instead of switching to GitLab’s browser-based dashboard.&lt;/p&gt;
&lt;p&gt;Thanks to its CI/CD-first orientation, you can run automated test scripts to reduce review time.
Moreover, GitLab allows you to carry out various code analyses, including &lt;a href=&quot;/security/static-application-security-testing/&quot;&gt;static application security testing (SAST)&lt;/a&gt;, &lt;a href=&quot;/security/dynamic-application-security-testing/&quot;&gt;dynamic application security testing (DAST)&lt;/a&gt;, and dependency tests.
It also provides an extensive vulnerability report.&lt;/p&gt;
&lt;p&gt;GitLab is an open-source platform that runs on the cloud but is also installable on on-premise servers.
You can use GitLab free, with optional advanced features starting from $19/month.&lt;/p&gt;
&lt;h4&gt;GitLab’s Pros&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;GitLab has a powerful integrative CI/CD pipeline and supports vulnerability scans.&lt;/li&gt;
&lt;li&gt;It is deployable on cloud and private servers, even without purchasing an enterprise plan.&lt;/li&gt;
&lt;li&gt;GitLab allows teams to set flexible review policies with varying permissions for code owners and teammates.&lt;/li&gt;
&lt;li&gt;GitLab’s private repositories ensure a more secure development workspace.&lt;/li&gt;
&lt;li&gt;Some features that you need to install as third-party tooling on GitHub, are already build-in using GitLab.&lt;/li&gt;
&lt;li&gt;It’s available as an extension for Visual Studio Code, allowing developers to not only commit changes (which is also supported by GitHub), but also to review code within the IDE.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;GitLab’s Cons&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Premium subscriptions are expensive.&lt;/li&gt;
&lt;li&gt;Integration with 3rd party tools can be complicated.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;azure&quot;&gt;3. Azure DevOps&lt;/h3&gt;
&lt;hr&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1192px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/c09f60f4e757ab32d0d803da7f10b772/7c866/Azure_Devops_Diff_View.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 49.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAKABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAECBf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAHcU0tCE//EABgQAQADAQAAAAAAAAAAAAAAAAABAjFB/9oACAEBAAEFAmocVf/EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABYQAAMAAAAAAAAAAAAAAAAAAAAgMf/aAAgBAQAGPwIi/wD/xAAZEAADAQEBAAAAAAAAAAAAAAAAASExEXH/2gAIAQEAAT8hUwqUSouCCZh+n//aAAwDAQACAAMAAAAQIM//xAAWEQADAAAAAAAAAAAAAAAAAAAQESH/2gAIAQMBAT8QUH//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/ED//xAAbEAEBAQACAwAAAAAAAAAAAAABEQAhUTFBsf/aAAgBAQABPxAI+M1gB7EtxIwXxm01tc3buMe+/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Azure DevOps Code review tool: Diff view&quot;
        title=&quot;Azure DevOps Code review tool: Diff view&quot;
        src=&quot;/static/c09f60f4e757ab32d0d803da7f10b772/7c866/Azure_Devops_Diff_View.jpg&quot;
        srcset=&quot;/static/c09f60f4e757ab32d0d803da7f10b772/f93b5/Azure_Devops_Diff_View.jpg 300w,
/static/c09f60f4e757ab32d0d803da7f10b772/b4294/Azure_Devops_Diff_View.jpg 600w,
/static/c09f60f4e757ab32d0d803da7f10b772/7c866/Azure_Devops_Diff_View.jpg 1192w&quot;
        sizes=&quot;(max-width: 1192px) 100vw, 1192px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://azure.microsoft.com/de-de/products/devops&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Azure DevOps&lt;/a&gt; is a web-based CI/CD pipeline offering versatile and disciplined code review practices.
While Azure DevOps’ workflow resembles those of GitHub and GitLab, it allows developers to be more rigorous when reviewing codes.
For example, &lt;a href=&quot;https://learn.microsoft.com/en-us/azure/devops/repos/git/branch-policies?view=azure-devops&amp;#x26;tabs=browser&quot;&gt;you can set branch policies to specify minimum reviewers for each request&lt;/a&gt;.
This differs from GitHub, where you configure code review settings on the &lt;a href=&quot;https://docs.github.com/en/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team&quot;&gt;team’s level&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;With Azure DevOps, developers can make linked work items or comment resolutions as part of the approval prerequisites.
This allows them to ensure each approval is supported by related user stories, product backlog items or issues for traceability.&lt;/p&gt;
&lt;p&gt;Before using the code reviewer, you must define each participant’s roles, security level and permissions.
Learning to enable or disable certain policies might be tricky for new Azure DevOps users.
But once it’s done, commenting and tagging reviewers in feedback is straightforward.&lt;/p&gt;
&lt;p&gt;Being a comprehensive CI/CD solution, Azure DevOps provides vast integrations with various apps in its marketplace.
For example, developers can use Sonar Cloud or Ado Security Scanner for automated vulnerability analysis and code quality checks.
Azure DevOps is also available as a plugin for IntelliJ IDEA, Eclipse, and Xcode, but the extension doesn’t support in-IDE code review.
Likewise, users of Visual Studio and VS Code can connect to Azure DevOps services via an extension.&lt;/p&gt;
&lt;p&gt;Azure DevOps is not an open-source project. It runs on the cloud but is deployable on private servers with Azure DevOps Server.
Signing up for its Basic Plan is free for the first 5 users and costs $6 per user monthly after that.&lt;/p&gt;
&lt;h4&gt;Azure DevOps’ Pros&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Decent options for integrations on the marketplace, including SonarCloud, Ado Security Scanner and Beagle Security.&lt;/li&gt;
&lt;li&gt;Available on the public cloud and installable on private servers.&lt;/li&gt;
&lt;li&gt;It supports diverse types of repositories, including Azure Repos Git, &lt;a href=&quot;https://learn.microsoft.com/en-us/azure/devops/cross-service/github-integration?view=azure-devops&quot;&gt;GitHub&lt;/a&gt;, &lt;a href=&quot;https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/bitbucket?view=azure-devops&amp;#x26;tabs=yaml&quot;&gt;BitBucket&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;IDE extension allows developers to launch pull requests from IntelliJ IDE, Eclipse, Xcode, Visual Studio and VS Code&lt;/li&gt;
&lt;li&gt;Allows developers to set up detailed and strict code review policies.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Azure DevOps’ Cons&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Setting up is not straightforward.&lt;/li&gt;
&lt;li&gt;It needs more integrations with 3rd party vendors.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;bitbucket&quot;&gt;4. Bitbucket&lt;/h3&gt;
&lt;hr&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/c370dd814ff8c7874947f16461dc9691/0d9ab/Bitbucket.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 50.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAKABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAMF/8QAFAEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAAB17TqgD//xAAXEAADAQAAAAAAAAAAAAAAAAADEDIz/9oACAEBAAEFAh5ocL//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/AT//xAAVEQEBAAAAAAAAAAAAAAAAAAABEP/aAAgBAgEBPwFn/8QAFhAAAwAAAAAAAAAAAAAAAAAAAhBx/9oACAEBAAY/AhjGP//EAB0QAAICAQUAAAAAAAAAAAAAAAABETEQIUFRobH/2gAIAQEAAT8hSdXb4Q+RUdfhUf/aAAwDAQACAAMAAAAQEA//xAAWEQADAAAAAAAAAAAAAAAAAAABEDH/2gAIAQMBAT8QEX//xAAWEQADAAAAAAAAAAAAAAAAAAABECH/2gAIAQIBAT8QKr//xAAcEAACAgIDAAAAAAAAAAAAAAAAAREhQVExcfD/2gAIAQEAAT8QczTb0Lpec0xckefpCOA//9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Bitbucket Code review tool&quot;
        title=&quot;Bitbucket Code review tool&quot;
        src=&quot;/static/c370dd814ff8c7874947f16461dc9691/e5166/Bitbucket.jpg&quot;
        srcset=&quot;/static/c370dd814ff8c7874947f16461dc9691/f93b5/Bitbucket.jpg 300w,
/static/c370dd814ff8c7874947f16461dc9691/b4294/Bitbucket.jpg 600w,
/static/c370dd814ff8c7874947f16461dc9691/e5166/Bitbucket.jpg 1200w,
/static/c370dd814ff8c7874947f16461dc9691/d9c39/Bitbucket.jpg 1800w,
/static/c370dd814ff8c7874947f16461dc9691/0d9ab/Bitbucket.jpg 2388w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Also, &lt;a href=&quot;https://bitbucket.org/product/features/code-review&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Bitbucket&lt;/a&gt; offers a built-in code review tool that works very similarly to GitHub’s, GitLab’s and Azure DevOps’s code review tools.&lt;/p&gt;
&lt;p&gt;It automatically integrates test results and security scans into the pull request view.
It allows to specify code review policies with conditions, thus ensuring each pull request is inspected consistently.
For example, Bitbucket allows you to enforce a minimum number of required reviewers, or that the build must pass without warnings.&lt;/p&gt;
&lt;p&gt;Especially the UI differs from the other code review offerings of repository system platforms.
While GitHub and GitLab make heavy use of tabs, Bitbucket prides itself to show all necessary information within one page.&lt;/p&gt;
&lt;p&gt;Another nice feature Bitbucket’s code review tool offers is to create tasks out of code review comments.
This is a good feature whenever code review reveals feedback that isn’t going to be worked on during this pull request but should be captured for later.&lt;/p&gt;
&lt;h4&gt;Bitbucket Pros&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Great enterprise solution offering nice code review features&lt;/li&gt;
&lt;li&gt;Integrates well with widely used tools such as Jira&lt;/li&gt;
&lt;li&gt;Better code review UI for most use cases&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Bitbucket Cons&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Expensive&lt;/li&gt;
&lt;li&gt;No free plan&lt;/li&gt;
&lt;li&gt;Harder to review commit-based&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;crucible&quot;&gt;5. Crucible&lt;/h3&gt;
&lt;hr&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/b9041c9ab5d39dc3a5511e37f6f3d8a5/139d6/Crucibel.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 40%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAIABQDASIAAhEBAxEB/8QAFwABAAMAAAAAAAAAAAAAAAAAAAECBf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAHbsJIX/8QAFxAAAwEAAAAAAAAAAAAAAAAAABASMf/aAAgBAQABBQKTF//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABQQAQAAAAAAAAAAAAAAAAAAABD/2gAIAQEABj8Cf//EABkQAAMAAwAAAAAAAAAAAAAAAAARQQGBkf/aAAgBAQABPyFHe5FDNn//2gAMAwEAAgADAAAAEAfP/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPxA//8QAHBABAAIBBQAAAAAAAAAAAAAAAQARMSFBcbHw/9oACAEBAAE/ELMM/WsDUQOV7gjun//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Crucible Code Review tool&quot;
        title=&quot;Crucible Code Review tool&quot;
        src=&quot;/static/b9041c9ab5d39dc3a5511e37f6f3d8a5/e5166/Crucibel.jpg&quot;
        srcset=&quot;/static/b9041c9ab5d39dc3a5511e37f6f3d8a5/f93b5/Crucibel.jpg 300w,
/static/b9041c9ab5d39dc3a5511e37f6f3d8a5/b4294/Crucibel.jpg 600w,
/static/b9041c9ab5d39dc3a5511e37f6f3d8a5/e5166/Crucibel.jpg 1200w,
/static/b9041c9ab5d39dc3a5511e37f6f3d8a5/d9c39/Crucibel.jpg 1800w,
/static/b9041c9ab5d39dc3a5511e37f6f3d8a5/139d6/Crucibel.jpg 2248w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.atlassian.com/software/crucible&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Crucible&lt;/a&gt; is one of the best Code review tools that support diverse types of code versioning systems.
Besides Git, the web-based code reviewer integrates with BitBucket Server, Mercurial, CVS, Subversion and Perforce.
It also works with other popular services, such as Jira, GitHub and BitBucket.&lt;/p&gt;
&lt;p&gt;Crucible provides well-defined roles that assign developers as an author, a reviewer or a moderator, where each role has different or overlapping permissions in the code review tool workflow.
What impresses me is Crucible’s reviewer selection feature, which &lt;a href=&quot;https://confluence.atlassian.com/crucible/choosing-reviewers-298977465.html&quot;&gt;suggests reviewers&lt;/a&gt; based on their contributions to the code files.&lt;/p&gt;
&lt;p&gt;The commenting workflow is quite different than in the previously discussed tools.
Crucible, for example, also allows reviewers to flag a comment as a defect, or to require changes.
Further, comments can be added as drafts, which is helpful in order to give the reviewer the ability to reflect on their feedback,
or to make changes to the comments as they learn more about the code that they are reviewing.&lt;/p&gt;
&lt;p&gt;However, Crucible lacks a strict rule-setting ability for enforcing strict approval requirements.
With Crucible, the author manually closes the review without stringent automated checks.
Code authors use a separate add-on to grant approval after all mandatory reviewers review the changes.
In this respect, GitLab, GitHub, and Azure DevOps are the better alternatives because of the preset rules.&lt;/p&gt;
&lt;p&gt;As part of the Atlassian ecosystem, Crucible users can use apps in the marketplace to enhance the code review workflow.
For example, enabling FishEye integration allows threaded changeset discussions amongst reviewers.
Alternatively, you can use Crucible’s REST API to create a custom integration.&lt;/p&gt;
&lt;p&gt;Despite its flexibility, Crucible’s drawback lies in its performance degradation when file revisions exceed 800 - which should hopefully never be the case.
As a workaround, Crucible recommends that developers split the review into multiple ones to prevent data indexing issues.&lt;/p&gt;
&lt;p&gt;Crucible is neither open source nor free. Built for private servers, Crucible charges a one-time payment that starts from $10 with up to 5 users.&lt;/p&gt;
&lt;h4&gt;Crucible’s Pros&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Crucible supports different types of repositories.&lt;/li&gt;
&lt;li&gt;It offers flexible integration options via the Atlassian marketplace or REST API.&lt;/li&gt;
&lt;li&gt;You can create pre-commit reviews from IntelliJ IDEA by using the Atlassian IDE Connector.&lt;/li&gt;
&lt;li&gt;It indicates how much time the reviewers took reviewing your codes.&lt;/li&gt;
&lt;li&gt;Crucible’s inline discussion allows seamless conversations to take place on the source code.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Crucible’s Cons&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;It doesn’t offer free plans.&lt;/li&gt;
&lt;li&gt;Crucible’s performance degrades when developers make substantial revisions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;codestream&quot;&gt;6. CodeStream&lt;/h3&gt;
&lt;hr&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/136035ef1e6be1d53e4f50028115b7d9/f2ee5/codestream_PR_preview_VS_Code.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 57.666666666666664%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAMABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAECBf/EABQBAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhADEAAAAdxXBQw//8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABBQJf/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQAGPwJf/8QAGBAAAwEBAAAAAAAAAAAAAAAAABARASH/2gAIAQEAAT8h4Qixf//aAAwDAQACAAMAAAAQQA//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/ED//xAAcEAEAAgEFAAAAAAAAAAAAAAABABFBECExUWH/2gAIAQEAAT8QKYrEE9wNbx4i8HT/2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;PR preview in VS Code when committing changes&quot;
        title=&quot;PR preview in VS Code when committing changes&quot;
        src=&quot;/static/136035ef1e6be1d53e4f50028115b7d9/e5166/codestream_PR_preview_VS_Code.jpg&quot;
        srcset=&quot;/static/136035ef1e6be1d53e4f50028115b7d9/f93b5/codestream_PR_preview_VS_Code.jpg 300w,
/static/136035ef1e6be1d53e4f50028115b7d9/b4294/codestream_PR_preview_VS_Code.jpg 600w,
/static/136035ef1e6be1d53e4f50028115b7d9/e5166/codestream_PR_preview_VS_Code.jpg 1200w,
/static/136035ef1e6be1d53e4f50028115b7d9/d9c39/codestream_PR_preview_VS_Code.jpg 1800w,
/static/136035ef1e6be1d53e4f50028115b7d9/df51d/codestream_PR_preview_VS_Code.jpg 2400w,
/static/136035ef1e6be1d53e4f50028115b7d9/f2ee5/codestream_PR_preview_VS_Code.jpg 3613w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.codestream.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;CodeStream&lt;/a&gt; offers a different approach to code review. Unlike its more established competitors, CodeStream allows developers to request a review anytime from their IDEs without committing changes.
This encourages discussions and problem-solving activities early on in coding.&lt;/p&gt;
&lt;p&gt;Recently acquired by New Relic, CodeStream supports 11 popular IDEs, including VS Code, Visual Studio, and Jetbrains.
It handles pull requests from GitHub, BitBucket and GitLab.
CodeStream also integrates with other services, such as Jira, Slack and Pixie, to streamline code review with issue trackers and real-time messaging tools.&lt;/p&gt;
&lt;p&gt;Once installed, CodeStream allows developers to raise a review request from any part of their code files with a sleek dialogue box.
Reviewers then comment, approve or request changes from their IDE. They can also determine who is permitted to leave reviews.&lt;/p&gt;
&lt;p&gt;While reviewing, reviewers can view the entire code tree and leave feedback on other parts of the source code.
This is in vast contrast with the other tools that allow reviewers to only see code that has been changed.
It’s also possible to start a discussion with CodeStream without launching a formal code review.&lt;/p&gt;
&lt;p&gt;Another aspect that distinguishes CodeStream from its competitors is the way how it treats feedback.
If a reviewer leaves a comment, this comment becomes a ‘codemark’, which will live on with the code.
This way, the comments developers left about code are always visible within your IDE and are not bound to a certain code review.&lt;/p&gt;
&lt;p&gt;CodeStream has yet to support code scanning or automated testing scripts.
As a cloud-based code reviewer, CodeStream does not offer to be installed on-premise but compensates for this by enforcing cloud security with measures like encryption, VPN, and network packet filters. It uses commit IDs instead of transmitting source code across the network.&lt;/p&gt;
&lt;p&gt;CodeStream has free, open-source extensions for VS Code, Visual Studio and JetBrains.
It is also available without additional fees to New Relic subscribers.&lt;/p&gt;
&lt;h4&gt;CodeStream’s Pros&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;CodeStream allows discussion/review without leaving the IDE&lt;/li&gt;
&lt;li&gt;It’s free.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;It has a simple configuration for assigning reviewer permissions.&lt;/li&gt;
&lt;li&gt;CodeStream applies robust security features, such as encrypting data on your machine and those stored on its server to create a secure code review environment.&lt;/li&gt;
&lt;li&gt;Integration with issue trackers, observability, and communication tools.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;CodeStream’s Cons&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;It is not deployable on private servers.&lt;/li&gt;
&lt;li&gt;Lacks integrations for automated code testing and vulnerability scans.&lt;/li&gt;
&lt;li&gt;The ability to implement certain code review policies is limited.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;review-board&quot;&gt;7. Review Board&lt;/h3&gt;
&lt;hr&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/25dc77d2a788ff8ce2a7a8644f45f645/936dd/Review_Board_Overview.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 48.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAKABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAgABBf/EABYBAQEBAAAAAAAAAAAAAAAAAAABAv/aAAwDAQACEAMQAAAB7TxwJWX/xAAXEAADAQAAAAAAAAAAAAAAAAAAAREg/9oACAEBAAEFAiEWP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABURAQEAAAAAAAAAAAAAAAAAABAR/9oACAECAQE/AYf/xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAY/Al//xAAZEAACAwEAAAAAAAAAAAAAAAAAARARUWH/2gAIAQEAAT8hSWFcOAp//9oADAMBAAIAAwAAABBX/wD/xAAVEQEBAAAAAAAAAAAAAAAAAAAQEf/aAAgBAwEBPxCn/8QAFREBAQAAAAAAAAAAAAAAAAAAEBH/2gAIAQIBAT8Qg//EABcQAQEBAQAAAAAAAAAAAAAAAAEAETH/2gAIAQEAAT8Q1ARE4hg0xMJ5N//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Overview Code review description Review Board&quot;
        title=&quot;Overview Code review description Review Board&quot;
        src=&quot;/static/25dc77d2a788ff8ce2a7a8644f45f645/e5166/Review_Board_Overview.jpg&quot;
        srcset=&quot;/static/25dc77d2a788ff8ce2a7a8644f45f645/f93b5/Review_Board_Overview.jpg 300w,
/static/25dc77d2a788ff8ce2a7a8644f45f645/b4294/Review_Board_Overview.jpg 600w,
/static/25dc77d2a788ff8ce2a7a8644f45f645/e5166/Review_Board_Overview.jpg 1200w,
/static/25dc77d2a788ff8ce2a7a8644f45f645/d9c39/Review_Board_Overview.jpg 1800w,
/static/25dc77d2a788ff8ce2a7a8644f45f645/936dd/Review_Board_Overview.jpg 2209w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.reviewboard.org/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Review Board&lt;/a&gt; is a standalone code review tool with hosting options.
Developers can install the tool on local machines or subscribe to the cloud-based version.
Either way, they get a review tool that supports almost every commonly-used repository.
The list includes Azure DevOps, Bazaar, Cliosoft SOS, CVS, Git, HCL VersionVault, IBM Rational Clear Case, Mercurial, Perforce, and Subversion.&lt;/p&gt;
&lt;p&gt;With Review Board, developers can ask for reviews without opening a pull request.
Code authors publish review requests, which alert the assigned reviewers on their dashboard.
The reviewers scroll through the review summaries and access those code reviews that require their feedback.
Once resolved, the author commits the changes to the repository.&lt;/p&gt;
&lt;p&gt;The tool’s workflow is quite standard, but you can augment it with available automation tools.
Review Board allows integration with static analysis tools, style checkers and CI/CD platforms.
It also enables streamlining the review workflow with Slack, Asana, Jenkin, Trello and other services.&lt;/p&gt;
&lt;p&gt;Review Board appeals with its bright colored panels, well-spaced text and CLI for advanced programmers.
Yet, its UI has a touch of an “old-school-open-source” system.&lt;/p&gt;
&lt;p&gt;Another nice feature of Review Board is that it allows reviewing not only code, but also PDFs, documentation,
and graphics, all in one place.&lt;/p&gt;
&lt;p&gt;It’s free and open-source, but the hosting option starts at $29 per month.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/e549754527f42d4725ffb3711de34abc/e4039/Diff-view-review-board.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 32.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAGABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAEF/8QAFgEBAQEAAAAAAAAAAAAAAAAAAQAC/9oADAMBAAIQAxAAAAHcphoj/8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQABBQJ//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFREBAQAAAAAAAAAAAAAAAAAAEBH/2gAIAQIBAT8Bp//EABQQAQAAAAAAAAAAAAAAAAAAABD/2gAIAQEABj8Cf//EABYQAQEBAAAAAAAAAAAAAAAAAAERAP/aAAgBAQABPyEJkrdd/9oADAMBAAIAAwAAABCD/wD/xAAVEQEBAAAAAAAAAAAAAAAAAAAQEf/aAAgBAwEBPxCH/8QAFhEBAQEAAAAAAAAAAAAAAAAAABEB/9oACAECAQE/EKXX/8QAGRAAAwADAAAAAAAAAAAAAAAAAAERMXGB/9oACAEBAAE/EFNV0TkU0P/Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Diff view in Review Board&quot;
        title=&quot;Diff view in Review Board&quot;
        src=&quot;/static/e549754527f42d4725ffb3711de34abc/e5166/Diff-view-review-board.jpg&quot;
        srcset=&quot;/static/e549754527f42d4725ffb3711de34abc/f93b5/Diff-view-review-board.jpg 300w,
/static/e549754527f42d4725ffb3711de34abc/b4294/Diff-view-review-board.jpg 600w,
/static/e549754527f42d4725ffb3711de34abc/e5166/Diff-view-review-board.jpg 1200w,
/static/e549754527f42d4725ffb3711de34abc/d9c39/Diff-view-review-board.jpg 1800w,
/static/e549754527f42d4725ffb3711de34abc/e4039/Diff-view-review-board.jpg 2053w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;Review Board’s Pros&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Review Board supports automated code review and CI integration.&lt;/li&gt;
&lt;li&gt;A free version is available.&lt;/li&gt;
&lt;li&gt;Review Bots allow developers to run partially automated code reviews.&lt;/li&gt;
&lt;li&gt;It shows diff views along the review requests in a simple interface.&lt;/li&gt;
&lt;li&gt;Supports 3rd party integrations.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Review Board’s Cons&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;It does not integrate with any IDE.&lt;/li&gt;
&lt;li&gt;Diff might not accurately display the changes when part of the code was moved.&lt;/li&gt;
&lt;li&gt;UI looks old-school.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;gerrit&quot;&gt;8. Gerrit&lt;/h3&gt;
&lt;hr&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/5cac6f5105eb98c78ed48647e38d499e/933dc/Gerrit-Diff-view.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 32.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAGABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAEF/8QAFQEBAQAAAAAAAAAAAAAAAAAAAQL/2gAMAwEAAhADEAAAAd0SUJ//xAAVEAEBAAAAAAAAAAAAAAAAAAAQEf/aAAgBAQABBQKP/8QAFREBAQAAAAAAAAAAAAAAAAAAARD/2gAIAQMBAT8BZ//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABQQAQAAAAAAAAAAAAAAAAAAABD/2gAIAQEABj8Cf//EABYQAAMAAAAAAAAAAAAAAAAAAAABEf/aAAgBAQABPyGqRiR//9oADAMBAAIAAwAAABAEH//EABYRAQEBAAAAAAAAAAAAAAAAAAABMf/aAAgBAwEBPxDCP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8QP//EABkQAQADAQEAAAAAAAAAAAAAAAEAEUEhMf/aAAgBAQABPxDob2LPtRAyf//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Gerrit Diffing View for code reviews&quot;
        title=&quot;Gerrit Diffing View for code reviews&quot;
        src=&quot;/static/5cac6f5105eb98c78ed48647e38d499e/e5166/Gerrit-Diff-view.jpg&quot;
        srcset=&quot;/static/5cac6f5105eb98c78ed48647e38d499e/f93b5/Gerrit-Diff-view.jpg 300w,
/static/5cac6f5105eb98c78ed48647e38d499e/b4294/Gerrit-Diff-view.jpg 600w,
/static/5cac6f5105eb98c78ed48647e38d499e/e5166/Gerrit-Diff-view.jpg 1200w,
/static/5cac6f5105eb98c78ed48647e38d499e/933dc/Gerrit-Diff-view.jpg 1540w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.gerritcodereview.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Gerrit&lt;/a&gt; is designed so that each commit represents a single, reviewable change.
Instead of creating a branch &lt;a href=&quot;https://gitenterprise.me/2013/10/17/gerrit-code-review-or-githubs-fork-and-pull-take-both/&quot;&gt;from the main branch&lt;/a&gt; and reviewing multiple commits on this branch for each pull request, Gerrit enforces to review each commit separately.
This fine-grained approach proves even viable for Android developers who use Gerrit to review the OS and manage thousands of daily commits.
A natural consequence is also a small fine-grained review culture at companies such as &lt;a href=&quot;https://www.awesomecodereviews.com/code-reviews-at-google/&quot;&gt;Google, that use Gerrit for code review&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Like GitHub, Gerrit is exclusive for Git repositories. Gerrit acts like a Git Server and can be deployed on a public or private cloud.
While it’s engineered for efficiency, Gerrit lacks the intuitive UI that GitHub does.
Its dashboard features panels and controls that support a functional code review tool workflow.&lt;/p&gt;
&lt;p&gt;To request code review, developers use the CLI to push code changes to Gerrit and the web interface to leave feedback.
Gerrit allows reviewers to vote and approve the results instead of setting rigorous code review policies.
By selecting from a score of -2 to +2, the reviewer indicates approval or request for further changes.
Once approved, a human verifier validates the result. Then, the author merges the changes with the master branch.&lt;/p&gt;
&lt;p&gt;Gerrit is free, open source and works with Eclipse-based IDEs and IntelliJ IDEA.
Besides being a robust code reviewer, it also integrates with plugins to provide analytics, event listeners, issue tracking and other useful functions.
Furthermore, Gerrit has a REST-like API that enables customized automation.&lt;/p&gt;
&lt;h4&gt;Gerrit’s Pros&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Gerrit is free.&lt;/li&gt;
&lt;li&gt;It can be hosted on public and private clouds.&lt;/li&gt;
&lt;li&gt;Available as plugins and enable commenting in Eclipse and IntelliJ IDEA.&lt;/li&gt;
&lt;li&gt;Ideal for projects with large repositories.&lt;/li&gt;
&lt;li&gt;Gerrit has a simple voting system to approve or reject code changes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Gerrit’s Cons&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Gerrit is not as intuitive as other code review tools.&lt;/li&gt;
&lt;li&gt;Lacks integration opinion with 3rd party services.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;jetbrains-space&quot;&gt;9. Jetbrains Space&lt;/h3&gt;
&lt;hr&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/65e396e85c3622b6f2905c0993867593/20ab6/Jetbrain.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 40.666666666666664%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAIABQDASIAAhEBAxEB/8QAFwABAAMAAAAAAAAAAAAAAAAAAAMEBv/EABQBAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhADEAAAAaOlCEH/xAAbEAAABwEAAAAAAAAAAAAAAAAAAQIDERIiI//aAAgBAQABBQJk+2Quk//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABgQAAIDAAAAAAAAAAAAAAAAAABCAhFR/9oACAEBAAY/AoXoop//xAAaEAACAwEBAAAAAAAAAAAAAAAAAREhYTHh/9oACAEBAAE/IUOhEeiv5KGMP//aAAwDAQACAAMAAAAQC8//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/ED//xAAbEAEAAgIDAAAAAAAAAAAAAAABABEhMUFhcf/aAAgBAQABPxAjGw4bix3QqCmry7M//9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Code review tool: Jetbrain Space Diff view&quot;
        title=&quot;Code review tool: Jetbrain Space Diff view&quot;
        src=&quot;/static/65e396e85c3622b6f2905c0993867593/e5166/Jetbrain.jpg&quot;
        srcset=&quot;/static/65e396e85c3622b6f2905c0993867593/f93b5/Jetbrain.jpg 300w,
/static/65e396e85c3622b6f2905c0993867593/b4294/Jetbrain.jpg 600w,
/static/65e396e85c3622b6f2905c0993867593/e5166/Jetbrain.jpg 1200w,
/static/65e396e85c3622b6f2905c0993867593/d9c39/Jetbrain.jpg 1800w,
/static/65e396e85c3622b6f2905c0993867593/df51d/Jetbrain.jpg 2400w,
/static/65e396e85c3622b6f2905c0993867593/20ab6/Jetbrain.jpg 2503w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.jetbrains.com/space/features/software-development.html#a-code-review&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Jetbrains Space&lt;/a&gt; is a new, comprehensive CI/CD platform that supports frictionless software development.
Its internal code review tool succeeds Upsource, a popular solution amongst Jetbrains users.
Space deploys on Docker containers, making it an ideal code review tool for private and public clouds.
It works with Git repositories created within the project or migrated from external sources.&lt;/p&gt;
&lt;p&gt;Space allows developers to start a review request on any JetBrains IDE, including IntelliJ IDEA, PhyCharm, Fleet, or PhpStorm.
Developers create merge requests, provide comments and approve changes without leaving the IDEs.
With Space, developers can enforce stricter control when merging changes.
They set merge request rules to ensure several conditions are met for approval through quality gates.
For example, allowing merges only if a &lt;a href=&quot;https://www.jetbrains.com/help/space/branch-and-merge-restrictions.html#quality-gates-for-merge-requests&quot;&gt;specific number of code owners approves&lt;/a&gt; the changes and all automated jobs are completed.&lt;/p&gt;
&lt;p&gt;To address growing project complexities, Space introduced Safe Merge, creating a temporary commit branch.
This allows code authors to implement and validate feedback before merging them with the main branch.&lt;/p&gt;
&lt;p&gt;Space offers various automation tools, issue trackers and other project management features to streamline code review.
It also integrates with popular third-party collaboration apps.
Space’s chat-like review conversations allow developers to track and manage changes easily.&lt;/p&gt;
&lt;p&gt;Space’s mobile app further differentiates itself from competitors by enabling responsive code reviews on the go.
Signing up is free and premium plans start from $8 per user monthly.&lt;/p&gt;
&lt;h4&gt;Space’s Pros&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Space offers intuitive features with a modern interface.&lt;/li&gt;
&lt;li&gt;Allows the review code on a mobile device.&lt;/li&gt;
&lt;li&gt;It has extensive built-in automation services and 3rd-party integrations.&lt;/li&gt;
&lt;li&gt;Works with all Jetbrains IDE, allowing developers to review codes in the editor.&lt;/li&gt;
&lt;li&gt;Deployable on cloud and on-premise servers.&lt;/li&gt;
&lt;li&gt;It offers an intuitive user interface that lets teams manage code changes and review efficiently.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Space’s Cons&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Space’s premium plan is relatively expensive.&lt;/li&gt;
&lt;li&gt;Extensive features might be overwhelming for new users.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;review-assistant&quot;&gt;10. Review Assistant plug-in Visual Studio&lt;/h3&gt;
&lt;hr&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/afeeebd9cedbd9efebe189b634ed86eb/a4413/Review_assistant.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 58.666666666666664%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAMABQDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAIBAwX/xAAUAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAHRtd0CQf/EABoQAAICAwAAAAAAAAAAAAAAAAABAhARIjH/2gAIAQEAAQUC2FESwR46/8QAFREBAQAAAAAAAAAAAAAAAAAAEBH/2gAIAQMBAT8Bh//EABURAQEAAAAAAAAAAAAAAAAAABAR/9oACAECAQE/Aaf/xAAZEAACAwEAAAAAAAAAAAAAAAABEAARIYH/2gAIAQEABj8CwTbHUH//xAAaEAADAQADAAAAAAAAAAAAAAAAARExECGh/9oACAEBAAE/IcKmItIJhVPOhO1x/9oADAMBAAIAAwAAABDcL//EABURAQEAAAAAAAAAAAAAAAAAABBR/9oACAEDAQE/EKP/xAAWEQEBAQAAAAAAAAAAAAAAAAAREDH/2gAIAQIBAT8QwE//xAAcEAEBAAICAwAAAAAAAAAAAAABEQAhQVFhcfD/2gAIAQEAAT8QRVAtRd094lkeq3gBWLdtwfNxhAzXnOXP/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Commenting in Review Assistant&quot;
        title=&quot;Commenting in Review Assistant&quot;
        src=&quot;/static/afeeebd9cedbd9efebe189b634ed86eb/e5166/Review_assistant.jpg&quot;
        srcset=&quot;/static/afeeebd9cedbd9efebe189b634ed86eb/f93b5/Review_assistant.jpg 300w,
/static/afeeebd9cedbd9efebe189b634ed86eb/b4294/Review_assistant.jpg 600w,
/static/afeeebd9cedbd9efebe189b634ed86eb/e5166/Review_assistant.jpg 1200w,
/static/afeeebd9cedbd9efebe189b634ed86eb/a4413/Review_assistant.jpg 1312w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.devart.com/review-assistant/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Review Assistant
from Devart Software&lt;/a&gt; is a code review plugin for Visual Studio and is also available as a standalone tool.
By installing the plugin, developers can request code reviews without leaving the editor.
It supports a rather extensive range of version control systems, including Team Foundation Server (TFS), Azure DevOps, Subversion (SVN), Git, Mercurial (Hg), and Perforce.&lt;/p&gt;
&lt;p&gt;Whether you’re practicing rigid or flexible code review workflow, Review Assistant allows you to configure the rules accordingly.
In stricter reviews, you can appoint a moderator to coordinate the discussions.
Meanwhile, code authors can request a review without specifying the reviewers in more lenient environments.
This allows any team members to contribute to the conversations, which appeals to Agile teams.&lt;/p&gt;
&lt;p&gt;While Review Assistant offers a coordinated review workflow, it’s also possible to start a discussion by commenting on any part of the code files.
The plugin captures all review activities and makes them available in reports.
Despite its flexibility, Review Assistant has limited integration, with MSBuild and Jenkins making up the few options.&lt;/p&gt;
&lt;p&gt;Review Assistant is free for up to 3 users. Then, teams pay $349.95 per year for up to 10 users.&lt;/p&gt;
&lt;h4&gt;Review Assistant’s Pros&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;The plugin allows flexible code review, enabling teams to work without conventional restrictions.&lt;/li&gt;
&lt;li&gt;Code authors can complete the review cycle without leaving Visual Studio IDE.&lt;/li&gt;
&lt;li&gt;Review Assistant is available as a standalone code review tool.&lt;/li&gt;
&lt;li&gt;It supports various version control systems.&lt;/li&gt;
&lt;li&gt;Threaded comments allow developers to start a discussion or comment on any part of the code.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Review Assistant’s Cons&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;It has limited automation options.&lt;/li&gt;
&lt;li&gt;Developers can’t reorder or filter the comments.&lt;/li&gt;
&lt;li&gt;The integration only works with Visual Studio.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;other-tools&quot;&gt;Other emerging code review tools&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/3fc75d483b40dfd10e1beda112646914/f0846/What-the-diff.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 37%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAHABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAEF/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEAMQAAAB3aFB/8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQABBQJ//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQAGPwJ//8QAGRAAAgMBAAAAAAAAAAAAAAAAATEAEBFR/9oACAEBAAE/IUVNPK//2gAMAwEAAgADAAAAEIAP/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPxA//8QAGBAAAwEBAAAAAAAAAAAAAAAAAAERMUH/2gAIAQEAAT8QdZqidsEb6f/Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;What the diff code review tool adds code review description&quot;
        title=&quot;What the diff code review tool adds code review description&quot;
        src=&quot;/static/3fc75d483b40dfd10e1beda112646914/e5166/What-the-diff.jpg&quot;
        srcset=&quot;/static/3fc75d483b40dfd10e1beda112646914/f93b5/What-the-diff.jpg 300w,
/static/3fc75d483b40dfd10e1beda112646914/b4294/What-the-diff.jpg 600w,
/static/3fc75d483b40dfd10e1beda112646914/e5166/What-the-diff.jpg 1200w,
/static/3fc75d483b40dfd10e1beda112646914/f0846/What-the-diff.jpg 1383w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;figcaption&gt;What the diff code review tool adds code review description&lt;/figcaption&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;p&gt;As software development practices evolve, more tools enter the marketplace to optimize code review processes.
Especially noteworthy are the &lt;a href=&quot;/tools/ai-code-review-tools/&quot;&gt;AI-powered code review tools&lt;/a&gt; that came to life
through the breakthrough of large language models,
and that promise to review our code without human intervention. Other interesting and very powerful code review tools
are based on static and dynamic analysis of our codebase. You can find an in-depth article
about &lt;a href=&quot;/automation/automated-code-reviews/&quot;&gt;tools to automate your code reviews here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To round up this article, I want to highlight some cutting-edge, and even some experimental code review tools,
that I think you should have at least heard of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://reviewpad.com/&quot;&gt;Reviewpad&lt;/a&gt;: This code review tool is your code review management assistant: it surfaces important information about your PR, like size, risk-profile and contributor, and helps drive the review process based on these characteristics.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://whatthediff.ai/&quot;&gt;WhatTheDiff&lt;/a&gt;: This is like ChatGPT, but for your code reviews. An AI-powered tool to automatically analyze and describe changes in pull requests. A must-have to make the code review best practice of &lt;a href=&quot;/best-practices/code-review-best-practices/#description&quot;&gt;good code review description&lt;/a&gt; a reality.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.plz.review/&quot;&gt;Plz.review&lt;/a&gt;: This code review tool aims to better GitHub’s review comment experience. For example, it allows reviewers to comment freely on other parts of the diff. It also allows for &lt;a href=&quot;/best-practices/stacked-pull-requests/&quot;&gt;stacked pull requests&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/features/copilot&quot;&gt;GitHub Copilot&lt;/a&gt;: This is not exactly a code reviewer but an AI assistant that predicts and helps developers write codes. It’s your AI pair programmer, yet it also explains code, which makes it a great code review assistant.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://aws.amazon.com/codeguru/&quot;&gt;AWS CodeGuru&lt;/a&gt;: AWS’s code reviewer uses machine learning to identify vulnerabilities and provides code quality recommendations.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://reviewable.io/&quot;&gt;Reviewable.io&lt;/a&gt;: This tool allows programmers to create discussion-like reviews on GitHub and GitHub Enterprise environments.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://softagram.com/&quot;&gt;Softagram&lt;/a&gt;: Developers use Softagram to visualize and forecast the impact of code changes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You still do not have enough? Have a look at my GitHub repository, where I &lt;a href=&quot;https://github.com/mgreiler/all-about-code-review#code-review-tools&quot;&gt;keep track of code review tools&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;faq&quot;&gt;Frequently Asked Questions (FAQ) about code review tools&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;When you learn about code review tools, you might have some additional questions, like why should you do code reviews, or how to choose the right tool.
Let’s clarify your questions:&lt;/p&gt;
&lt;h3 id=&quot;why-code-review&quot;&gt;Why is code review important?&lt;/h3&gt;
&lt;p&gt;Code review allows software developers to identify bugs, vulnerabilities and bad coding practices that can’t be picked up by compiler and build tools.
When left unchecked, such bad source code often manifest itself in production.&lt;/p&gt;
&lt;p&gt;By practicing code review, you receive timely feedback from your team members on issues that escape your attention.
This is helpful because we, software developers, might be blindsided in certain coding stages despite our best efforts.
Read more about code reviews in this &lt;a href=&quot;/fundamentals/code-review-101/&quot;&gt;code review 101 article&lt;/a&gt;, or check out
the &lt;a href=&quot;/code-reading/code-review-techniques/&quot;&gt;10 best code review techniques&lt;/a&gt; to review code more effectively and efficiently.&lt;/p&gt;
&lt;h3 id=&quot;why-tool&quot;&gt;Why should you use a code review tool?&lt;/h3&gt;
&lt;p&gt;In a nutshell, &lt;a href=&quot;/respectful-constructive-code-review-feedback/&quot;&gt;code review feedback&lt;/a&gt; helps you identify
code issues and improve software quality.
Yet, without proper code review tooling, bottlenecks such as manual note-taking and email exchanges limit the process.
As a result, software developers found themselves overwhelmed by non-coordinated feedback and costly delays.&lt;/p&gt;
&lt;p&gt;Luckily, today, developers have access to modern review tools that allow them to spend less time seeking reviews and leaving &lt;a href=&quot;/respectful-constructive-code-review-feedback/&quot;&gt;constructive feedback&lt;/a&gt;.
Instead of exchanging dozens of emails, code review tools ensure the entire code review process is transparent, well-coordinated and observable.
That way, you can spare more time working on new features instead of manually sending and tracking unresolved review requests.&lt;/p&gt;
&lt;p&gt;The code review tools presented in this post are a great way to ensure code reviews are done systematically. They
allow for reviews to take place asynchronously.
&lt;a href=&quot;/best-practices/code-review-best-practices/#document&quot;&gt;Feedback and changes are documented and can be traced&lt;/a&gt;,
tracked and saved so that you can always
come back to see why certain changes have been implemented
or what your thought process or decision was at that time.&lt;/p&gt;
&lt;h3 id=&quot;how-choose-tool&quot;&gt;How to choose a code review tool?&lt;/h3&gt;
&lt;p&gt;Which code review tool is the best for your team depends on your requirements.&lt;/p&gt;
&lt;p&gt;Teams that prioritize CI/CD automation might opt for GitLab or Jetbrains Space, which are built with integrations in mind.
Meanwhile, CodeStream and Review Assistant allow you to request feedback from your teammates without leaving the IDE.&lt;/p&gt;
&lt;p&gt;Version control systems that the tool supports are equally important. For example, GitHub and GitLab work exclusively with Git repositories.
If you manage code with SVN, you need tools like Crucible or Review Board.&lt;/p&gt;
&lt;p&gt;Some developers prefer cloud-based code review solutions that allow them to leave comments remotely.
Others require tools that can be deployed on private servers.&lt;/p&gt;
&lt;p&gt;Code scanners and automated testing are desirable features to prevent code exploits.
Tools like GitLab and Azure Devop provide vulnerability scanners to help address security issues early on.&lt;/p&gt;
&lt;p&gt;Finally, more and more people write and develop code while they are on the go.
While online solutions such as GitHub and GitLab allow one to view the repository and even to leave comments in a mobile browser, the experience is far from good.
Space, on the other hand, has a dedicated mobile code review app that makes reviewing on the go easy.&lt;/p&gt;
&lt;h3 id=&quot;ai-tools&quot;&gt;AI-powered code review tools&lt;/h3&gt;
&lt;p&gt;The tools discussed in this article focus on streamlining the code review lifecycle and process. This means
they focus on allowing you to give comments, reply to comments, and accept or reject the code changes.&lt;/p&gt;
&lt;p&gt;Other great code review tools help you, particularly, with &lt;em&gt;doing&lt;/em&gt; the code review.
I wrote about them in two articles: one highlighting &lt;a href=&quot;/tools/ai-code-review-tools/&quot;&gt;AI-based code review tools&lt;/a&gt;,
which use large language models
to give “automagically” feedback about your code, and another post that lists
&lt;a href=&quot;/automation/automated-code-reviews/&quot;&gt;static and dynamic analysis tools&lt;/a&gt; that also help you find and fix problems automatically.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “10 Best Code Review Tools In 2024”: &lt;a href=&quot;https://www.awesomecodereviews.com/tools/best-code-review-tools/&quot;&gt;https://www.awesomecodereviews.com/tools/best-code-review-tools/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2024-10-17T09:59:30+01:00&quot;&gt;October 17, 2024&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Code Review 101]]></title><description><![CDATA[Learn what a code review is, how to do code reviews and the common steps of a code review workflow, in this article from awesomecodereviews…]]></description><link>https://www.awesomecodereviews.com/fundamentals/code-review-101/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/fundamentals/code-review-101/</guid><pubDate>Tue, 17 Jan 2023 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Learn what a code review is, how to do code reviews and the common steps of a code review workflow, in this article from &lt;a href=&quot;https://www.awesomecodereviews.com/&quot;&gt;awesomecodereviews.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here is what you will learn:&lt;br/&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;#what-is-code-review&quot;&gt;What is code review&lt;/a&gt; &lt;br/&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;#steps&quot;&gt;Common steps of a code review&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;#identify&quot;&gt;Identify the code to be reviewed&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#prepare&quot;&gt;Prepare the code for review&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#select&quot;&gt;Select the reviewer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#conduct&quot;&gt;Conduct the review&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#discuss&quot;&gt;Discuss and address any issues&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#approve&quot;&gt;Approve or reject&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;#make-decisions&quot;&gt;Making code review decisions&lt;/a&gt; &lt;br/&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;#tools&quot;&gt;Code Review tools&lt;/a&gt;&lt;br/&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;#conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;br/&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;#research&quot;&gt;Relevant research&lt;/a&gt;&lt;br/&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;what-is-code-review&quot;&gt;What is code review&lt;/h2&gt;
&lt;p&gt;During a code review, developers inspect source code to improve the code or to learn about it.
Code review is a valuable practice in software development because it helps to improve code quality,
enhances teamwork and collaboration, promotes learning and helps to share knowledge.
How exactly a code review process looks differs from company to company, and often even from team to team.&lt;/p&gt;
&lt;p&gt;Code reviews can be very formal, following strict code review checklists, similar to
a &lt;a href=&quot;https://en.wikipedia.org/wiki/Fagan_inspection&quot;&gt;Fagan inspection&lt;/a&gt;. Yet, they can also be very informal,
where, for example, one developer asks another developer to quickly look over the code while they pass by in the office.
This form of code review is often referred to as &lt;a href=&quot;https://www.ccs.neu.edu/home/lieber/courses/cs4500/f07/lectures/code-review-types.pdf&quot;&gt;“over-the-shoulder code review”&lt;/a&gt;.
Code reviews can be done synchronously or asynchronously.&lt;/p&gt;
&lt;p&gt;Nowadays, developers often use a tool to conduct code reviews. It’s also common that code reviews are done whenever
a small work unit is ready (e.g., on a daily or weekly basis),
and that code reviews concentrate only on newly developed or changed code.
Yet, some companies still perform code reviews only after
major milestones have been reached, and then they review large parts of the codebase.&lt;/p&gt;
&lt;p&gt;You see, there are many nuances to code review practices and workflows.&lt;/p&gt;
&lt;h2 id=&quot;steps&quot;&gt;Common steps of a code review&lt;/h2&gt;
&lt;p&gt;Independent of the differences in the code review processes, let’s look at which common steps code reviews have
to get a better understanding of how code reviews take place.&lt;/p&gt;
&lt;p&gt;In a nutshell, a code review will follow the following six steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Identify the code to be reviewed&lt;/li&gt;
&lt;li&gt;Prepare the code for change&lt;/li&gt;
&lt;li&gt;Select the reviewers&lt;/li&gt;
&lt;li&gt;Conduct the code review&lt;/li&gt;
&lt;li&gt;Discuss and address problems&lt;/li&gt;
&lt;li&gt;Approve or reject the code&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;While those six steps give you a basic mental model of a code review workflow, there are several nuances to how development teams do code reviews.
Let’s look at the different steps to code reviews more closely.&lt;/p&gt;
&lt;h3 id=&quot;identify&quot;&gt;Identify the code to be reviewed &lt;/h3&gt;
&lt;p&gt;First, we have to identify which code needs to be reviewed. Often this could be a new feature or module, or it could be a change to existing code.
If we look ten years back, development teams would review large parts of a codebase or even a whole codebase during a code review.
And such code reviews would happen every few months.&lt;/p&gt;
&lt;p&gt;Nowadays, it’s more common that the code that’s reviewed is related to a ticket or work item a developer has been working on.
This means code reviews happen much more frequently (daily or weekly), and that way less code is reviewed.&lt;/p&gt;
&lt;p&gt;In addition, during code reviews, reviewers will nowadays only focus on code that has been touched while a developer made changes.
This means reviewers look only at lines added, deleted or changed, but do not inspect the code that has not been touched.
The reason for this focus stems from the &lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;code review tooling used&lt;/a&gt;.
The code review tools often only highlight the differences between one version of the code and the other version of the code.&lt;/p&gt;
&lt;h3 id=&quot;prepare&quot;&gt;Prepare the code for review &lt;/h3&gt;
&lt;p&gt;Before you ask another person for a code review, you should ensure that the code is of high quality and ready for review.
This starts with a self-review.
A self-review is the process in which you take the time to look through your code change carefully as if you were a reviewer.
The best approach is to use a code review tool or any tool that highlights the exact changes that you made (i.e. a file comparison tool, also called a diff tool).
This ensures that you see the code differently, and also helps you remember what changes you have made.
During this inspection, clean up the code, add comments or documentation, and make sure that the code is organized and easy to understand.&lt;/p&gt;
&lt;p&gt;You might also want to reorganize or better name your commit messages, as they can help the reviewer to better understand your work.&lt;/p&gt;
&lt;p&gt;After the review, you ensure that the code compiles without warnings or errors. The code should be covered by relevant tests, that have been run and passed.&lt;/p&gt;
&lt;p&gt;It is a good code review practice to also run static analysis tools such as linters over your code and fix any errors or warnings that the tool detects before asking a human code reviewer to spend time inspecting your code.&lt;/p&gt;
&lt;h3 id=&quot;select&quot;&gt;Select the reviewer &lt;/h3&gt;
&lt;p&gt;The next step is to select the reviewer or reviewers. Reviewer selection is a very important aspect of code reviews.
The review is only as good as the reviewers you selected. This means, if you chose a person that knows little about the codebase, the programming language used, or the requirements this change implements, you cannot expect them to be very helpful to improve the code.
Yet, adding them might help them to learn, which is also a code review goal.&lt;/p&gt;
&lt;p&gt;In general, appropriate reviewers are people from your own or another development team or someone with specific expertise or
knowledge related to the code being reviewed. &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;Studies recommend choosing two reviewers&lt;/a&gt;.
But it’s not uncommon to &lt;a href=&quot;/code-reviews-at-google/&quot;&gt;see only 1&lt;/a&gt; or up to 10 reviewers selected per code review.
There are also quite a few &lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;code review tools&lt;/a&gt; that help during reviewer selection.&lt;/p&gt;
&lt;p&gt;When we talk about code review, we expect that the code author and the code reviewer are not the same people.
Yet, exceptionally some developers will review their own code and call it a code review. Yet, we call the activity where at least one &lt;em&gt;other person&lt;/em&gt; than the author looks at the code, a code review, and we will refer to the activity of inspecting
your own code as a self-review.&lt;/p&gt;
&lt;h3 id=&quot;conduct&quot;&gt;Conduct the review &lt;/h3&gt;
&lt;p&gt;The actual code review can be conducted in a variety of ways, such as in person, via email, or using a code review tool. Independent of the tooling or meeting type, during the review, the reviewer carefully inspects the code, looking for defects, problems, and opportunities for improvement.&lt;/p&gt;
&lt;p&gt;While historically, code inspections followed a rigorous review protocol, code reviews are nowadays very ad hoc in nature.
This means, reviewers seldom get instructions on how to review the code or what to look for.
This uncertainty and lack of focus reduce the effectiveness of code reviews.
There are common aspects code reviewers are implicitly expected to look for, such as maintainability, readability, quality and correctness of the code.
&lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;Code review checklists&lt;/a&gt; can be very helpful to make sure reviewers focus on all important aspects and do not forget some. They also make the code review process more systematic. Finally, code review checklists are a great learning tool and help teams have more coherent code reviews, in which the quality of the code review fluctuates less with the reviewer.&lt;/p&gt;
&lt;h3 id=&quot;discuss&quot;&gt;Discuss and address any issues &lt;/h3&gt;
&lt;p&gt;If the reviewers find issues with the code, they discuss those with the developer.
Together, the code author and the reviewer come up with solutions to the problems.
This means that they either agree to make changes to the code, or they decide that changes are not necessary.
Often, comments of the reviewers are also questions about the code, that do not require any changes but help the reviewer to learn about the code or approaches.&lt;/p&gt;
&lt;p&gt;During tool-assisted code reviews, those discussions take place in written form.
Written communication can easily lead to misunderstandings, as people lack facial expressions, tone or body language to understand what the other person meant.
Therefore, written &lt;a href=&quot;/respectful-constructive-code-review-feedback/&quot;&gt;code review feedback needs to be carefully phrased&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;While unfortunately few developers ever get &lt;a href=&quot;/workshops/&quot;&gt;training on how to give and receive feedback&lt;/a&gt;, there is much that can be learned.
Feedback can quickly hurt feelings, or even destroy relationships.
Code reviews are also known to &lt;a href=&quot;http://www-personal.umich.edu/~yhhy/index_files/bias_code_review_FSE20.pdf&quot;&gt;amplify biases&lt;/a&gt;,
and studies show that depending on &lt;a href=&quot;https://developers.googleblog.com/2022/06/Using-research-to-make-code-review-more-equitable.html&quot;&gt;age, ethnicity, or gender, developers get more or less pushback&lt;/a&gt; during code reviews.&lt;/p&gt;
&lt;p&gt;Also, during code review discussions conflicts can arise, which need to be handled and managed.
To make sure code review discussions are productive and do not cross boundaries, it’s important that developers are aware of &lt;a href=&quot;https://www.michaelagreiler.com/resolving-conflict-nonviolent-communication/&quot;&gt;conflict management strategies&lt;/a&gt;, and possess &lt;a href=&quot;https://www.michaelagreiler.com/developing-conflict-competence/&quot;&gt;conflict competence&lt;/a&gt;.
In addition, code review guidelines, as well as a code of conduct should be in place.&lt;/p&gt;
&lt;p&gt;With the right learning and feedback culture, teams can greatly benefit from each other during code reviews, and relationships are strengthened.&lt;/p&gt;
&lt;h3 id=&quot;approve&quot;&gt;Approval or Rejection &lt;/h3&gt;
&lt;p&gt;The goal of the feedback loop, in which identified issues are discussed and reworked, is to get the code into a state that is acceptable and can be approved and merged with the production codebase.
Some code review tools offer the functionality to reject the change.
This means the code will not be merged with the codebase. Yet, &lt;a href=&quot;/best-practices/code-review-best-practices/#norejections&quot;&gt;rejections of code should happen on as exceptions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A better approach than straight-out rejecting the code is to say the code is not acceptable in its current state.
Yet, after some rework and another code review round at least parts of this code change will land in production.
This often happens when the code change is large, and there are many issues that need to be addressed and reworked.
During this rework, often pull requests are closed without being merged. Yet, the code appears again in a new pull request.&lt;/p&gt;
&lt;p&gt;Especially in open source, code changes are indeed rejected with the consequence that the code never makes it into the codebase.
This can happen if there are too many issues and the open source maintainers would need to spend too much time giving guidance or improving the change.
Another common reason for rejection is that the proposed code change implements a feature that’s not aligned with the roadmap of the product.&lt;/p&gt;
&lt;p&gt;In company or closed source settings, rejections that lead to never merging the code should be an absolute exception and a red flag that shows that something is wrong with the collaboration or project management.
Rejections during code review &lt;a href=&quot;../../../downloads/research/actionable-framework-developer-experience.pdf&quot;&gt;decrease developer experience&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;make-decisions&quot;&gt;Making code review decisions&lt;/h2&gt;
&lt;p&gt;But how are code review outcomes determined?
There are different strategies to approve code. They differ mainly by who decides whether the code change should be accepted or changes be made to the proposed solution.&lt;/p&gt;
&lt;p&gt;In some teams, there is only one person, such as the team lead, the engineering manager or an architect that makes the “Yay” or “Nay”  decision.
Such decision approaches tend to be faster, yet can make developers feel less ownership of the product.&lt;/p&gt;
&lt;p&gt;In other companies, more collaborative decision-making processes are preferred.
Here, for example, the majority of the team decides what happens to the code.
Yet, in practice, often there is no clear or explicit decision-making process or criteria.&lt;/p&gt;
&lt;p&gt;Missing &lt;a href=&quot;https://www.michaelagreiler.com/creating-coding-standard/&quot;&gt;group decision strategies during code reviews&lt;/a&gt; can lead to a slowdown of the software development process, and developers often build up resentment of code reviews.&lt;/p&gt;
&lt;h2 id=&quot;tools&quot;&gt;Code review tools&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;Code review tools&lt;/a&gt; assist during code reviews by allowing reviews to be done asynchronously, highlighting the differences between one version of the code and another, allowing developers to attach feedback in form of comments to the code, and by tracing and tracking discussions and decisions.&lt;/p&gt;
&lt;p&gt;The most well-known and widely used code review tools are GitHub, GitLab, and BitBucket.
All of those code review tools are integrated with the code repository, which makes them convenient to use, as no other tools need to be installed.&lt;/p&gt;
&lt;p&gt;There are also standalone tools that are popular such as Gerrit and ReviewBoard that work with a broader range of version control systems such as SVN, or Mercurial.&lt;/p&gt;
&lt;p&gt;Finally, many code review extensions let you review code right within your IDE.&lt;/p&gt;
&lt;p&gt;A new and upcoming code review tool in this category is CodeStream. But most code editors such as Visual Studio, VIM etc. have their own plugins and extensions that allow you to review code.&lt;/p&gt;
&lt;p&gt;Each tool has its own pros and cons, yet they all support discussing code during code reviews in a similar form.&lt;/p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;As you have seen there are many nuances to how code reviews are conducted at different companies or in different teams.&lt;/p&gt;
&lt;p&gt;Many of the approaches, such as synchronous or asynchronous reviews, have their pros and cons, which I’ll cover in an upcoming article.&lt;/p&gt;
&lt;p&gt;By following a structured process during code reviews and using the right tools and techniques, developers can ensure that their code meets the highest standards and is ready for production.&lt;/p&gt;
&lt;p&gt;As a good next step, learn more about &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practices&lt;/a&gt; or look at the pros and cons of different &lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;code review tools&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;research&quot;&gt;Relevant research&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://tobias-baum.de/rp/classification.pdf&quot;&gt;A Faceted Classification Scheme for Change-Based Industrial Code Review Processes, 2016&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.mozilla.org/en/mozilla/gender-bias-code-reviews/&quot;&gt;Mozilla experiment aims to reduce bias in code reviews&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Code Review 101”: &lt;a href=&quot;https://www.awesomecodereviews.com/fundamentals/code-review-101/&quot;&gt;https://www.awesomecodereviews.com/fundamentals/code-review-101/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-01-17T09:59:30+01:00&quot;&gt;January 17, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[A Code Review Checklist – Focus on these 10 Important Topics]]></title><description><![CDATA[A code review checklist, together with clear review guidelines, helps a team inspect changes systematically and keep its attention on high…]]></description><link>https://www.awesomecodereviews.com/checklists/code-review-checklist/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/checklists/code-review-checklist/</guid><pubDate>Fri, 06 Jan 2023 22:40:32 GMT</pubDate><content:encoded>&lt;p&gt;A code review checklist, together with clear review guidelines, helps a team inspect changes systematically and keep its attention on high-impact risks.&lt;/p&gt;
&lt;p&gt;The research is promising, but more nuanced than “checklists always win.” In a &lt;a href=&quot;https://link.springer.com/article/10.1007/s10664-022-10123-8&quot;&gt;controlled experiment with 70 developers&lt;/a&gt;, a checklist was associated with better review effectiveness and efficiency on one complex task, while a guided checklist performed better on a smaller task. The researchers caution that the participants’ generally low review performance limits the strength of the results. Treat a checklist as a focusing aid, not a guarantee that a review is complete.&lt;/p&gt;
&lt;p&gt;You can find the checklist I use in my &lt;a href=&quot;/workshops/&quot;&gt;code review workshops&lt;/a&gt; also in a compact format on &lt;a href=&quot;https://github.com/mgreiler/code-review-checklist&quot;&gt;GitHub&lt;/a&gt;. Let’s start with a quick overview of the code review checklist topics.&lt;/p&gt;
&lt;h2&gt;Code Review Checklist Overview&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;#implementation&quot;&gt;Implementation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#errors&quot;&gt;Logic Errors and Bugs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#logging&quot;&gt;Error Handling and Logging&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#usability&quot;&gt;Usability and Accessibility&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#ethics&quot;&gt;Ethics and Morality&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#testing&quot;&gt;Testing and Testability&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#dependencies&quot;&gt;Dependencies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#security&quot;&gt;Security and Data Privacy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#performance&quot;&gt;Performance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#readability&quot;&gt;Readability&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Code Review Checklist for Code Authors&lt;/h2&gt;
&lt;p&gt;Code review checklists are not only something for the code reviewers. Instead, as the author of the code change, follow the &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practice&lt;/a&gt; and &lt;strong&gt;be your own reviewer&lt;/strong&gt;!&lt;/p&gt;
&lt;p&gt;So, before sending out the code for review, make sure that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The code builds and passes the required static-analysis checks&lt;/li&gt;
&lt;li&gt;The code passes the relevant unit, integration, and system tests&lt;/li&gt;
&lt;li&gt;You have double-checked for spelling mistakes&lt;/li&gt;
&lt;li&gt;You cleaned up temporary comments, debugging code, and outdated TODOs&lt;/li&gt;
&lt;li&gt;You described what changed, why it changed, and how you verified it&lt;/li&gt;
&lt;li&gt;You understand and can explain every part of the change, including any AI-generated code&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Apart from that, you, as the code author, should run through the same code review checklist as the reviewer.&lt;/p&gt;
&lt;h2&gt;Code Review Checklist for Code Reviewers&lt;/h2&gt;
&lt;p&gt;As a code reviewer, it is your task to &lt;em&gt;look for the most important issues first&lt;/em&gt;.
It is easy to get hung up on nitpicking, but that is rarely the most valuable use of review time.&lt;/p&gt;
&lt;p&gt;In one of our large studies at Microsoft, we investigated what &lt;a href=&quot;https://www.awesomecodereviews.com/respectful-constructive-code-review-feedback/&quot;&gt;valuable code review feedback&lt;/a&gt; looks like.
We saw that comments revealing larger structural or logical problems are perceived as much more valuable than comments that focus on minor issues.&lt;/p&gt;
&lt;p&gt;This is where code review checklists come into play.
A great checklist directs your attention to the important and most valuable issues.
Below you will find the checklist that I also use during my &lt;a href=&quot;/workshops/&quot;&gt;code review workshops&lt;/a&gt;.
It is divided into ten sections, each with questions that guide your attention. First, let’s look at what AI-assisted development changes.&lt;/p&gt;
&lt;h2&gt;What Changes When Code or Reviews Are AI-Assisted?&lt;/h2&gt;
&lt;p&gt;The ten review topics do not fundamentally change when a coding agent or large language model (LLM) writes the code. The quality bar and the author’s responsibility remain the same. What changes are some of the failure modes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify generated API calls, package names, versions, and behavior against authoritative documentation or the package registry. A 2025 USENIX study of &lt;a href=&quot;https://www.usenix.org/conference/usenixsecurity25/presentation/spracklen&quot;&gt;package hallucinations in 576,000 generated code samples&lt;/a&gt; found nonexistent package references in output from commercial and open-source models.&lt;/li&gt;
&lt;li&gt;Make sure generated tests assert the required behavior rather than merely repeat the implementation’s assumptions. A useful test should fail when the production change is absent or broken.&lt;/li&gt;
&lt;li&gt;Check AI-generated pull request summaries against the actual diff, requirements, and design decisions.&lt;/li&gt;
&lt;li&gt;Treat AI review comments and proposed fixes as hypotheses to verify, not as approval. The 2026 &lt;a href=&quot;https://arxiv.org/abs/2509.01494&quot;&gt;SWR-Bench study of 1,000 real-world pull requests&lt;/a&gt; found substantial room for improvement in current automated review systems. Aggregating independent review passes improved F1 scores by up to 43.67%, but it did not make human judgment optional.&lt;/li&gt;
&lt;li&gt;Follow your organization’s data-handling rules before sending source code, prompts, logs, secrets, or personal data to an external AI service.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;An AI reviewer can be useful for self-review or a focused additional pass. It should supplement the checklist, automated checks, and accountable human review. For practical tool and workflow guidance, see the overview of &lt;a href=&quot;/tools/ai-code-review-tools/&quot;&gt;AI code review tools&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Does this code change do what it is supposed to do?&lt;/li&gt;
&lt;li&gt;Can the solution be simplified?&lt;/li&gt;
&lt;li&gt;Does this change add unwanted compile-time or run-time dependencies?&lt;/li&gt;
&lt;li&gt;Is a framework, API, library, or service used that should not be used?&lt;/li&gt;
&lt;li&gt;Could an additional framework, API, library, or service improve the solution?&lt;/li&gt;
&lt;li&gt;Is the code at the right abstraction level?&lt;/li&gt;
&lt;li&gt;Is the code modular enough?&lt;/li&gt;
&lt;li&gt;Can a better solution be found in terms of maintainability, readability, performance, or security?&lt;/li&gt;
&lt;li&gt;Does similar functionality already exist in the codebase? If yes, why isn’t it reused?&lt;/li&gt;
&lt;li&gt;Are there any best practices, design patterns, or language-specific patterns that could &lt;em&gt;substantially&lt;/em&gt; improve this code?&lt;/li&gt;
&lt;li&gt;Where relevant, does the code follow the project’s established design principles and language idioms?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;errors&quot;&gt;Logic Errors and Bugs&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Can you think of any use case in which the code does not behave as intended?&lt;/li&gt;
&lt;li&gt;Could boundary values, missing or invalid input, concurrency, retries, timeouts, or partial failures break the code?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;logging&quot;&gt;Error Handling and Logging&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Is error handling done the correct way?&lt;/li&gt;
&lt;li&gt;Should any logging or debugging information be added or removed?&lt;/li&gt;
&lt;li&gt;Are error messages user-friendly?&lt;/li&gt;
&lt;li&gt;Are there enough log events, and are they written in a way that allows for easy debugging?&lt;/li&gt;
&lt;li&gt;Do logs and error messages avoid exposing secrets or unnecessary personal data?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;usability&quot;&gt;Usability and Accessibility&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Is the proposed solution well-designed from a usability perspective?&lt;/li&gt;
&lt;li&gt;Is the API well documented?&lt;/li&gt;
&lt;li&gt;Is the proposed solution (UI) accessible?&lt;/li&gt;
&lt;li&gt;Is the API/UI intuitive to use?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;ethics&quot;&gt;Ethics and Morality&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Does this change make use of user data in a way that might raise privacy concerns?&lt;/li&gt;
&lt;li&gt;Does the change exploit behavioral patterns or human weaknesses?&lt;/li&gt;
&lt;li&gt;Might the code, or what it enables, lead to mental or physical harm for some users?&lt;/li&gt;
&lt;li&gt;If the code changes how people interact, are appropriate measures in place to prevent, limit, and report harassment or abuse?&lt;/li&gt;
&lt;li&gt;Could the change unfairly exclude or disadvantage any group of users?&lt;/li&gt;
&lt;li&gt;If the change uses an algorithm, AI, or machine learning, were its outcomes evaluated for harmful bias across relevant user groups, for example gender/racial/political/religious/ableist bias?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;testing&quot;&gt;Testing and Testability&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Is the code testable?&lt;/li&gt;
&lt;li&gt;Have automated tests been added, or have related ones been updated to cover the change in functionality?&lt;/li&gt;
&lt;li&gt;Do the existing tests reasonably cover the code change (unit/integration/system tests)?&lt;/li&gt;
&lt;li&gt;Are there some test cases, input, or edge cases that should be tested in addition?&lt;/li&gt;
&lt;li&gt;Do new or changed tests fail when the implementation is absent or intentionally broken?&lt;/li&gt;
&lt;li&gt;For probabilistic or LLM-powered behavior, do evaluations cover representative and adversarial cases, including failure and fallback paths?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;dependencies&quot;&gt;Dependencies&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Are new or updated dependencies necessary?&lt;/li&gt;
&lt;li&gt;Are package names, publishers, sources, and versions correct and supported?&lt;/li&gt;
&lt;li&gt;Were lockfiles updated, and were known vulnerabilities and license constraints checked?&lt;/li&gt;
&lt;li&gt;Were updates to documentation, configuration, or README files made as required by this change?&lt;/li&gt;
&lt;li&gt;Are there any potential impacts on other parts of the system, public APIs, data formats, or backward compatibility?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;security&quot;&gt;Security and Data Privacy&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Does the code introduce any security vulnerabilities?&lt;/li&gt;
&lt;li&gt;Are authorization and authentication handled correctly?&lt;/li&gt;
&lt;li&gt;Is untrusted input validated and handled with context-appropriate defenses, such as parameterized queries and output encoding to prevent security attacks such as cross-site scripting or SQL injection?&lt;/li&gt;
&lt;li&gt;Is sensitive data minimized and securely collected, transmitted, logged, stored, and deleted?&lt;/li&gt;
&lt;li&gt;Does this code change reveal secrets such as API keys, tokens, passwords, or other credentials?&lt;/li&gt;
&lt;li&gt;Are responses from external services, files, webhooks, and model outputs treated as untrusted input?&lt;/li&gt;
&lt;li&gt;If the product uses an LLM, could prompt injection expose data or trigger tools and actions without the correct authorization?&lt;/li&gt;
&lt;/ul&gt;
&lt;br/&gt;
&lt;p&gt;&lt;em&gt;For more guidance during reviewing code for security vulnerabilities, check out this &lt;a href=&quot;/checklists/secure-code-review-checklist/&quot;&gt;secure code review checklist&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;performance&quot;&gt;Performance&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Do you think this code change decreases system performance?&lt;/li&gt;
&lt;li&gt;Do you see any significant opportunity to reduce latency, memory, compute, network, or model usage and cost?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;readability&quot;&gt;Readability&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Is the code easy to understand?&lt;/li&gt;
&lt;li&gt;Which parts were confusing to you and why?&lt;/li&gt;
&lt;li&gt;Can the readability of the code be improved by smaller methods?&lt;/li&gt;
&lt;li&gt;Can the readability of the code be improved by different function, method, or variable names?&lt;/li&gt;
&lt;li&gt;Is the code located in the right file/folder/package?&lt;/li&gt;
&lt;li&gt;Do you think certain methods should be restructured to have a more intuitive control flow?&lt;/li&gt;
&lt;li&gt;Is the data flow understandable?&lt;/li&gt;
&lt;li&gt;Are there redundant or outdated comments?&lt;/li&gt;
&lt;li&gt;Could some comments convey the message better?&lt;/li&gt;
&lt;li&gt;Would more comments make the code more understandable?&lt;/li&gt;
&lt;li&gt;Could some comments be removed by making the code itself more readable?&lt;/li&gt;
&lt;li&gt;Is there any commented-out code?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Expert Opinions&lt;/h2&gt;
&lt;p&gt;In addition to the 10 topics on this code review checklist, think about whether someone else should have a look at this code.&lt;/p&gt;
&lt;p&gt;Ask yourself:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do you think a specific expert, like a security expert or a usability expert, should look over the code before it can be accepted?&lt;/li&gt;
&lt;li&gt;Will this code change impact different teams, and should they review the change as well?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Well, that’s it. You looked and thought about the most pressing issues with this code review checklist. Congratulations!&lt;/p&gt;
&lt;p&gt;Now, one of the &lt;strong&gt;exercises&lt;/strong&gt; that I do in my &lt;a href=&quot;/workshops/&quot;&gt;code review workshops&lt;/a&gt; is to reflect with the participants on this checklist for code reviews by answering three questions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Which parts of the code review checklist are you focusing on the most?&lt;/li&gt;
&lt;li&gt;Which parts of the code review checklist do you tend to neglect?&lt;/li&gt;
&lt;li&gt;Do you believe some of those points are more important for a checklist for code inspection? Why?&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;But what about coding styles and conventions?&lt;/h2&gt;
&lt;p&gt;Maybe during this exercise, you realized that I did not check whether the code follows the right coding style. So, is that not important?&lt;/p&gt;
&lt;p&gt;Short answer: it is important. A clear coding style guide helps teams keep a codebase consistent. Consistency can make reviews faster, help people move between projects, and keep the code readable and maintainable. For example, &lt;a href=&quot;/code-reviews-at-google/&quot;&gt;Google has one of the fasted code review turnaround times&lt;/a&gt; specifically because of those clear and consistent rules.&lt;/p&gt;
&lt;p&gt;Google, for example, publishes &lt;a href=&quot;https://google.github.io/styleguide/&quot;&gt;ready-made style guides for many languages&lt;/a&gt;. They are a useful starting point, but adapt a guide to the needs of your codebase and team.&lt;/p&gt;
&lt;p&gt;Document the ground rules and automate the objective ones. Revisit them when the team’s needs change, but do not relitigate established style preferences in every review. This article explains &lt;a href=&quot;https://www.michaelagreiler.com/creating-coding-standard/&quot;&gt;how to get a team to agree on a coding standard&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Automate what can be automated&lt;/h2&gt;
&lt;p&gt;But, once you decide how your codebase should look, take the time to install and configure tooling properly so that code formatting becomes a matter of pressing a button.&lt;/p&gt;
&lt;p&gt;Also, there is much more you can do.
Use static analysis tools, such as &lt;a href=&quot;/automation/datadog-code-security/&quot;&gt;Datadog Static Code Analysis&lt;/a&gt; or &lt;a href=&quot;/automation/codeql/&quot;&gt;CodeQL&lt;/a&gt; to free up the time of your human code reviewers.
Depending on their rules and configuration, these tools can enforce style, flag defect patterns, and detect classes of security vulnerabilities.
It is worth the initial effort.
Similarly, &lt;a href=&quot;/tools/ai-code-review-tools/&quot;&gt;AI code review tools&lt;/a&gt; can help you with a first pass of the code review, but they are not a replacement for human judgment.&lt;/p&gt;
&lt;h2&gt;Be respectful, humble, and kind&lt;/h2&gt;
&lt;p&gt;Finally, the quality of the code review feedback does not only depend on WHAT you are saying but also on HOW you are saying it. So, the best code review feedback is worth nothing when it isn’t carefully phrased, humble, and kind.&lt;/p&gt;
&lt;p&gt;For starters, phrase non-blocking feedback as suggestions instead of demands. For example, instead of writing “Variable name should be &lt;code class=&quot;language-text&quot;&gt;removeObject&lt;/code&gt;,” say, “What about calling the variable &lt;code class=&quot;language-text&quot;&gt;removeObject&lt;/code&gt;?” For more input, read my article on &lt;a href=&quot;/respectful-constructive-code-review-feedback/&quot;&gt;how to give respectful code review feedback&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Print out this code review checklist&lt;/h2&gt;
&lt;p&gt;As you need this code review checklist always next to you, I prepared a beautiful printable version for you.
You can download the &lt;a href=&quot;https://7858485475626.gumroad.com/l/code-review-checklist/&quot;&gt;code review checklist as a printable PDF for free here&lt;/a&gt;.
Alternatively, check it out on &lt;a href=&quot;https://github.com/mgreiler/code-review-checklist&quot;&gt;GitHub&lt;/a&gt;, and don’t forget to star it.
Another resource that might be super valuable for you is my &lt;a href=&quot;https://www.michaelagreiler.com/code-review-e-book/&quot;&gt;code review e-book&lt;/a&gt;.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “A Code Review Checklist – Focus on these 10 Important Topics”: &lt;a href=&quot;https://www.michaelagreiler.com/code-review-checklist-2/&quot;&gt;https://www.michaelagreiler.com/code-review-checklist-2/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2026-07-24T09:59:30+02:00&quot;&gt;July 24, 2026&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Why we need an Awesome Code Review Workshop]]></title><description><![CDATA[Copy and Paste this email and send it to your manager to ask for workshop approval. Dear manager, Code reviews are an extremely effective…]]></description><link>https://www.awesomecodereviews.com/workshop-approval/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/workshop-approval/</guid><pubDate>Sun, 11 Sep 2022 08:00:57 GMT</pubDate><content:encoded>&lt;h3&gt;Copy and Paste this email and send it to your manager to ask for workshop approval.&lt;/h3&gt;
&lt;p&gt;Dear manager,&lt;/p&gt;
&lt;p&gt;Code reviews are an extremely effective collaboration and quality assurance technique. As you know, they help with knowledge transfer, improve the code base, prevent accidents, detect bugs, help us to stay informed about what colleagues are doing, and help us trace and track decisions for later reference.&lt;/p&gt;
&lt;p&gt;Software developers are expected to know how to do code reviews without ever getting any formal training for it. Yet, code reviews are a socio-technical engineering practices that is performed on a team level.&lt;/p&gt;
&lt;p&gt;This means that code reviews also require social, technical and organizational skills. This is also the reason why many teams struggle with it. In fact, research shows that the majority of engineering teams that practice code reviews experience major problems like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a slowed-down development process&lt;/li&gt;
&lt;li&gt;long code review turnaround times&lt;/li&gt;
&lt;li&gt;large reviews that are hard to understand&lt;/li&gt;
&lt;li&gt;bottlenecks and review overload&lt;/li&gt;
&lt;li&gt;reviews that are just signed off without a review (aka rubberstamp reviews)&lt;/li&gt;
&lt;li&gt;nit-picking or meaningless feedback&lt;/li&gt;
&lt;li&gt;unfair reviews&lt;/li&gt;
&lt;li&gt;conflicts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;While we are taking our code reviews seriously, we also experience problems, and we believe that a workshop focusing especially on overcoming code review pitfalls will help us to get a better developer experience.&lt;/p&gt;
&lt;p&gt;The workshop is designed to enable us to get to fast and effective reviews, which enables us to develop high-quality applications with fewer bugs!&lt;/p&gt;
&lt;p&gt;That’s why we are asking for workshop tickets to &lt;a href=&quot;/workshops/&quot;&gt;https://www.awesomecodereviews.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Awesome code review workshops from Dr. Michaela Greiler are cohort-based training sessions that are interactive and focus on overcoming our main code review pain points. Dr. Greiler has been working with teams worldwide for over 10 years to improve their code review practice. She has worked with teams at Microsoft, Wix, NationalInstruments, and many more.&lt;/p&gt;
&lt;p&gt;Did you know that developers spend between 10-20 percent of their time doing code reviews? We are no exception.&lt;/p&gt;
&lt;p&gt;By participating in the workshop our team will be able to have a common understanding of how to do code reviews to gain the most benefits while minimizing their drawbacks. &lt;strong&gt;A faster and more effective code review process will literally save the company money, and the improved code quality will improve the user experience and allows us to react faster to user requests.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Dr. Greiler has taught hundreds of developers how to bring their code reviews from bottleneck to superpower.&lt;/p&gt;
&lt;p&gt;We want to do this too!&lt;/p&gt;
&lt;p&gt;Please support us in growing our skill set so that we can write better software for you and our users. Click here to visit Awesome Code Reviews and purchase the tickets for us: &lt;a href=&quot;https://ti.to/doctor-mckayla/&quot;&gt;https://www.awesomecodereviews.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As code reviews are a team effort, I hope you will allow several of our developers to do the training. The good news is, Michaela offers group discounts. So the more tickets we purchase, the bigger the discount.&lt;/p&gt;
&lt;p&gt;Please let me know if you have any questions. Thanks for helping us grow and learn. We are sure this will have a significant positive impact on our development practices!&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;- &lt;em&gt;your team&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;This email is inspired by the awesome &lt;a href=&quot;https://twitter.com/kentcdodds&quot;&gt;Kent C. Dodds&lt;/a&gt;, that has similar letters that let you ask for his &lt;a href=&quot;https://testingjavascript.com/&quot;&gt;Testing JavaScript&lt;/a&gt; and his &lt;a href=&quot;https://epicreact.dev/boss/&quot;&gt;EpicReact&lt;/a&gt; course. Thanks, Kent!&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Why we need an Awesome Code Review Workshop”: &lt;a href=&quot;https://www.awesomecodereviews.com/workshop-approval/&quot;&gt;https://www.awesomecodereviews.com/workshop-approval/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-01-14T09:00:57+01:00&quot;&gt;January 14, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Use Pull Request Templates to Improve Code Review Descriptions]]></title><description><![CDATA[Learn how to use a pull request template to ensure code authors provide meaningful code review descriptions. Pull request templates help…]]></description><link>https://www.awesomecodereviews.com/pull-request-template/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/pull-request-template/</guid><pubDate>Wed, 24 Aug 2022 08:00:57 GMT</pubDate><content:encoded>&lt;p&gt;Learn how to use a pull request template to ensure code authors provide meaningful code review descriptions. Pull request templates help populate your pull request (PR) with the correct information, so code authors remember what’s important to explain about their PR. A good code review description significantly reduces the review burden for the code reviewer, and is a &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practice&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Reducing the reviewer burden&lt;/h2&gt;
&lt;p&gt;If you have ever done a &lt;a href=&quot;/workshops/&quot;&gt;workshop or coaching session&lt;/a&gt; with me, you will know my mantra of “reducing the reviewer’s burden.” This means it’s essential for a great code review experience to make code reviewing as easy as possible for the reviewer.
Today, I’ll show you how you can use code review templates or pull request templates to help the code reviewer to understand the pull request.
In addition, pull request templates are a memory aid for the code author.&lt;/p&gt;
&lt;p&gt;You have probably seen it before: a pull request with several files changed and only the sparse PR title. Maybe the description consists of strangely worded commit messages, which will not help you understand what is going on in this pull request.&lt;/p&gt;
&lt;p&gt;Why does this happen? Why didn’t the code author take the time to describe the change in more detail?&lt;/p&gt;
&lt;h2&gt;Code authors are the expert on the code change&lt;/h2&gt;
&lt;p&gt;The answer is that the code author is the expert on the code. They spent a lot of time deeply engaged with this code and the problem behind it.&lt;/p&gt;
&lt;p&gt;Independent of whether they spend two hours, two days, or two weeks, they know much more about this piece of code than the code reviewer will most likely ever learn about it during code review.&lt;/p&gt;
&lt;p&gt;Being an expert can be a disadvantage. This disadvantage is called the &lt;a href=&quot;https://www.csteachingtips.org/tip/beware-expert-blind-spot-ensure-you-can-help-your-students-overcome-initial-difficulties-are&quot;&gt;expert blind spot&lt;/a&gt;.
The expert blind spot describes the phenomenon that an expert has difficulty assessing whether something is easy or hard.&lt;/p&gt;
&lt;p&gt;Because of this, the code author will often assume that the review of their code is easy. Three files and 50 lines changed — that’s trivial to review in the mind of the code author.
Therefore, code authors &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;often do not write code review descriptions&lt;/a&gt;; and if they do, they only write extremely brief ones.&lt;/p&gt;
&lt;h2&gt;Are code review descriptions unnecessary?&lt;/h2&gt;
&lt;p&gt;In a &lt;a href=&quot;../../downloads/research/code-reviewing-in-the-trenches.pdf&quot;&gt;study about code reviews I led at Microsoft&lt;/a&gt;,
we asked code authors if they think sparse code review descriptions are sufficient to understand the code.
The majority of the engineers said that, indeed, there is no need for a lengthy code review description.
The few words or sentences are sufficient
for the code reviewer to understand the change.&lt;/p&gt;
&lt;p&gt;Yet, when we observed and interviewed code reviewers, we saw that this was not the case. Code reviewers struggled to understand the code,
and were missing a lot of context that the code author could have easily provided.&lt;/p&gt;
&lt;p&gt;We also saw that code reviewers that were given a good code review description which included the reasons why a change was needed,
were more motivated and gave better feedback than code reviewers that lacked this information.&lt;/p&gt;
&lt;h2&gt;But is it enough to link to the issue?&lt;/h2&gt;
&lt;p&gt;When I ask developers to include better code review descriptions, many argue that they did link to the issue, and that this should really be enough information for the code author to
understand this change.&lt;/p&gt;
&lt;p&gt;While it is a &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;good practice&lt;/a&gt; to link to the issue or ticket behind this change, it is not enough.
Issues or tickets are made for the code author. They help track the status of the work.
While they also often comprise a description of the problem, this description might be outdated.
In addition, they lack several important pieces of information that a code reviewer needs to understand and assess the code change.
For example, a ticket or issue seldomly or never describes which alternative solutions the author has tried before.&lt;/p&gt;
&lt;p&gt;The code review description does not have and actually should not be a copy of the issue.&lt;/p&gt;
&lt;p&gt;Instead it should briefly summarize information from the issue relevant to the code reviewer in the code review description.
The majority of the code review description should contain information specifically created to aid the reviewer in understanding the change.&lt;/p&gt;
&lt;p&gt;So, what is this exactly, you wonder?&lt;/p&gt;
&lt;h2&gt;What should a good code review description contain?&lt;/h2&gt;
&lt;p&gt;A good code review description contains the information the code reviewer needs to understand and assess the change.&lt;/p&gt;
&lt;p&gt;You can provide the reviewer with the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Explanation of the change
&lt;ul&gt;
&lt;li&gt;the reason why this change is needed&lt;/li&gt;
&lt;li&gt;why you have chosen this solution approach&lt;/li&gt;
&lt;li&gt;which other solution approaches you considered and why you did not implement them&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Information on the quality of the change
&lt;ul&gt;
&lt;li&gt;how you tested it, including important cases you did not test&lt;/li&gt;
&lt;li&gt;relevant automated checks and their results&lt;/li&gt;
&lt;li&gt;screenshots, recordings, logs, or before-and-after measurements where useful&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Guidance for the reviewer
&lt;ul&gt;
&lt;li&gt;what should the reviewers look at&lt;/li&gt;
&lt;li&gt;where should they start the review&lt;/li&gt;
&lt;li&gt;where is the main change or risk&lt;/li&gt;
&lt;li&gt;whether the change needs a rollout, migration, feature flag, or rollback plan&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Keep the template short enough that people complete it thoughtfully. A long checklist often becomes a box-ticking exercise. Use your continuous integration and repository rules to enforce checks that can be automated; reserve the description for context and evidence that only the author can provide.&lt;/p&gt;
&lt;p&gt;In &lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;code review tools&lt;/a&gt; such as GitHub, GitLab, Azure DevOps, or Bitbucket, you can add a template that lets everyone know (code author and reviewer)
what is expected from them. It’s also a great tool to make sure people remember what they should fill in and helps to overcome the expert blind spot.&lt;/p&gt;
&lt;h2&gt;Can you give me an example of a good pull request template?&lt;/h2&gt;
&lt;p&gt;Sure! For example, here is a screenshot of a minimalistic code review template from Spotify.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/809b3f290a9d78932a3a55065f18d366/38f6f/pr-template-screenshot.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 25.666666666666664%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAFABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAEF/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEAMQAAAB3qAH/8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQABBQJ//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQAGPwJ//8QAFRABAQAAAAAAAAAAAAAAAAAAEEH/2gAIAQEAAT8hr//aAAwDAQACAAMAAAAQc8//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/ED//xAAYEAADAQEAAAAAAAAAAAAAAAAAARFRcf/aAAgBAQABPxCRs4RYRYf/2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Minimalistic PR template from Spotify&quot;
        title=&quot;Minimalistic PR template from Spotify&quot;
        src=&quot;/static/809b3f290a9d78932a3a55065f18d366/e5166/pr-template-screenshot.jpg&quot;
        srcset=&quot;/static/809b3f290a9d78932a3a55065f18d366/f93b5/pr-template-screenshot.jpg 300w,
/static/809b3f290a9d78932a3a55065f18d366/b4294/pr-template-screenshot.jpg 600w,
/static/809b3f290a9d78932a3a55065f18d366/e5166/pr-template-screenshot.jpg 1200w,
/static/809b3f290a9d78932a3a55065f18d366/38f6f/pr-template-screenshot.jpg 1366w&quot;
        sizes=&quot;(max-width: 1200px) 100vw, 1200px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;But you can of course include more helpful questions.
I’ve created a GitHub template that comprises more template prompts,
that you are free to use and tailor to your own needs.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;“Pull request template”-Template ;-)&lt;/strong&gt;&lt;/h3&gt;
&lt;hr&gt;
&lt;h4&gt;What does this PR do?&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Briefly summarize what this PR changes.&lt;/li&gt;
&lt;li&gt;Why is this change needed?&lt;/li&gt;
&lt;li&gt;Add Screenshots/screencasts of this change (if appropriate)&lt;/li&gt;
&lt;li&gt;Link the relevant issue, ticket, or decision.&lt;/li&gt;
&lt;li&gt;Which alternatives or tradeoffs should reviewers know about?&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;How have you tested your change?&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;color:grey&quot;&gt;Describe the tests and other evidence you used. Note anything you did not test.&lt;/span&gt;&lt;/p&gt;
&lt;ul class=&quot;contains-task-list&quot;&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; I added or updated relevant automated tests&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; I updated relevant documentation&lt;/li&gt;
&lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; disabled&gt; I included screenshots or recordings for user-facing changes&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;What should the reviewer focus on?&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Where should the review start?&lt;/li&gt;
&lt;li&gt;What is the highest-risk or most complicated part?&lt;/li&gt;
&lt;li&gt;Do you have specific questions for the reviewer?&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;What should the reviewer focus on?&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Do you have specific questions for the reviewer?&lt;/li&gt;
&lt;li&gt;Where is the highest risk/ most complicated change that the reviewer should focus on?&lt;/li&gt;
&lt;li&gt;Is there a specific aspect the reviewer should focus on (e.g., correct error handling, API usage)&lt;/li&gt;
&lt;li&gt;What is a good place to start the review (e.g., specific file/method?)&lt;/li&gt;
&lt;li&gt;Does this need a migration, feature flag, monitoring, or rollback plan?&lt;/li&gt;
&lt;li&gt;Are there compatibility, security, privacy, or performance implications?&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;span style=&quot;margin:1em;&quot;/&gt;
&lt;p&gt;You can find more inspiration for your own code review templates here:
&lt;a href=&quot;https://github.com/theos/theos/blob/master/.github/PULL_REQUEST_TEMPLATE.md&quot;&gt;PR template from theos&lt;/a&gt;,
&lt;a href=&quot;https://github.com/go-sql-driver/mysql/blob/master/.github/PULL_REQUEST_TEMPLATE.md&quot;&gt;Pull request template from mysql&lt;/a&gt;, &lt;a href=&quot;https://github.com/ionic-team/ionic-framework/blob/main/.github/PULL_REQUEST_TEMPLATE.md&quot;&gt;
PR template from Ionic&lt;/a&gt;, and one from &lt;a href=&quot;https://github.com/apache/jmeter/blob/master/PULL_REQUEST_TEMPLATE.md&quot;&gt;Apache&lt;/a&gt;. A sweet and short &lt;a href=&quot;https://github.com/spotify/luigi/blob/master/.github/PULL_REQUEST_TEMPLATE.md&quot;&gt;pull request template from Spotify Luigi&lt;/a&gt;, or another short &lt;a href=&quot;https://github.com/backstage/backstage/blob/master/.github/PULL_REQUEST_TEMPLATE.md&quot;&gt;PR template from Spotify’s backstage project&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;How do you add a PR template on GitHub?&lt;/h2&gt;
&lt;p&gt;In GitHub, you can add one or multiple pull request templates to your repository. Create &lt;code class=&quot;language-text&quot;&gt;pull_request_template.md&lt;/code&gt; in the repository root, &lt;code class=&quot;language-text&quot;&gt;docs/&lt;/code&gt;, or &lt;code class=&quot;language-text&quot;&gt;.github/&lt;/code&gt;. For multiple templates, add Markdown files to a &lt;code class=&quot;language-text&quot;&gt;PULL_REQUEST_TEMPLATE&lt;/code&gt; directory in one of those locations. GitHub also supports organization-wide defaults through a public &lt;code class=&quot;language-text&quot;&gt;.github&lt;/code&gt; repository.
You can find a more detailed description,
including screenshots on how to &lt;a href=&quot;https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository&quot;&gt;create a pull request template here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;How do you add a merge request template on GitLab?&lt;/h2&gt;
&lt;p&gt;On GitLab, merge request templates are Markdown (&lt;code class=&quot;language-text&quot;&gt;.md&lt;/code&gt;) files in &lt;code class=&quot;language-text&quot;&gt;.gitlab/merge_request_templates/&lt;/code&gt; in your repository. You can select a template when opening a merge request or name one &lt;code class=&quot;language-text&quot;&gt;Default.md&lt;/code&gt; to use it by default. GitLab also supports group-level and instance-level default templates. You can read all about &lt;a href=&quot;https://docs.gitlab.com/user/project/description_templates/&quot;&gt;GitLab description templates here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;How do you add a pull request template in Azure DevOps?&lt;/h2&gt;
&lt;p&gt;Azure DevOps repositories allow you to add pull request templates to pre-populate the code review description each time a PR is opened.
Azure allows to create three different templates: a &lt;em&gt;default&lt;/em&gt; template that is used for all new pull requests, &lt;em&gt;branch specific&lt;/em&gt; PR templates,
that are used whenever the PR is opened on a specific branch, and &lt;em&gt;additional&lt;/em&gt; that can be added in addition by the person that opened the PR.
Learn more about &lt;a href=&quot;https://learn.microsoft.com/en-us/azure/devops/repos/git/pull-request-templates&quot;&gt;using pull request templates in Azure DevOps here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;How do you add a pull request template in Bitbucket?&lt;/h2&gt;
&lt;p&gt;Bitbucket Cloud repository admins can configure a default description in the repository settings. Bitbucket Cloud also supports a repository-managed Markdown template at &lt;code class=&quot;language-text&quot;&gt;.bitbucket/pull_request_template.md&lt;/code&gt;; this template is branch-dependent. See the &lt;a href=&quot;https://support.atlassian.com/bitbucket-cloud/kb/pull-request-templates-in-bitbucket-cloud/&quot;&gt;Bitbucket pull request template documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Can AI write the pull request description?&lt;/h2&gt;
&lt;p&gt;AI can create a useful first draft. &lt;a href=&quot;https://docs.github.com/en/copilot/how-tos/copilot-on-github/copilot-for-github-tasks/create-a-pr-summary&quot;&gt;GitHub Copilot can generate a pull request summary&lt;/a&gt;, &lt;a href=&quot;https://docs.gitlab.com/user/project/merge_requests/duo_in_merge_requests/&quot;&gt;GitLab Duo can summarize code changes into a merge request description&lt;/a&gt;, and &lt;a href=&quot;https://support.atlassian.com/bitbucket-cloud/docs/use-atlassian-intelligence-to-help-write-or-edit-content/&quot;&gt;Bitbucket Cloud includes an AI writing assistant&lt;/a&gt; for pull request descriptions and comments. Availability depends on your plan and workspace settings.&lt;/p&gt;
&lt;p&gt;These tools are best at summarizing what is visible in the diff. &lt;strong&gt;They may miss the reason for the change, rejected alternatives, operational risk, or tests performed outside the repository.&lt;/strong&gt; Treat the generated text as a draft: verify every claim, remove noise, and add the context only the author knows. Never paste secrets or sensitive ticket content into an AI tool, and follow your organization’s data-handling policy.&lt;/p&gt;
&lt;p&gt;You can also use your template as a prompt for an AI assistant:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Draft this PR description using the headings in our template. Base factual claims only on the diff and test output. Mark missing intent, tradeoffs, risks, and manual testing as questions for me instead of guessing.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This combination works well: the template defines what a reviewer needs, the AI reduces the writing effort, and the author remains accountable for accuracy.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;This article showed you how you can use the &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practice&lt;/a&gt; of using pull request templates to improve your code review description.
If found the article helpful, please share it with your friends and colleagues.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Use Pull Request Templates to Improve Code Review Descriptions”: &lt;a href=&quot;https://www.awesomecodereviews.com/pull-request-template/&quot;&gt;https://www.awesomecodereviews.com/pull-request-template/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2026-07-24T09:00:57+02:00&quot;&gt;July 24, 2026&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Manual Stacked Pull Requests]]></title><description><![CDATA[Stacked pull requests are a powerful way to break down a large feature into smaller, meaningful subtasks.
They let you keep moving forward…]]></description><link>https://www.awesomecodereviews.com/best-practices/stacked-pull-requests/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/best-practices/stacked-pull-requests/</guid><pubDate>Wed, 23 Sep 2020 13:22:11 GMT</pubDate><content:encoded>&lt;p&gt;Stacked pull requests are a powerful way to break down a large feature into smaller, meaningful subtasks.
They let you keep moving forward on your work while reviewers can already start reviewing earlier parts of the change.&lt;/p&gt;
&lt;p&gt;This workflow comes with many benefits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;shorter-lived branches&lt;/li&gt;
&lt;li&gt;faster, more focused reviews&lt;/li&gt;
&lt;li&gt;reviewers staying closer to the work as it evolves&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this article, I’ll show you how to &lt;strong&gt;set up and manage stacked PRs using only plain Git commands&lt;/strong&gt;—no additional tools required.
Because it purely uses Git, you can implement stacked-PRs
with any Git-based code review tool, such as GitHub, GitLab, or Bitbucket.
This will be a hands-on, technical guide.&lt;/p&gt;
&lt;p&gt;If you’d prefer a higher-level overview of the concepts, workflows, and available tools behind stacked PRs, check out my &lt;a href=&quot;/best-practices/stacked-prs/&quot;&gt;complete developer guide to stacked PRs.&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Making Large Code Changes Reviewable with Stacked Pull Requests&lt;/h2&gt;
&lt;p&gt;Code reviews are hard but worth it. However, this equation changes when the code change becomes too large. Research confirms this: the more code to review, the less effective the review.&lt;/p&gt;
&lt;p&gt;So, we should aim to review small code changes. But how?&lt;/p&gt;
&lt;p&gt;That’s where stacked pull requests come in. It’s a technique I also teach in my &lt;a href=&quot;/workshops/&quot;&gt;code review workshops&lt;/a&gt;.
It allows you to break code changes into smaller and more coherent pieces that live on their own branches.
In return, &lt;em&gt;reviewers&lt;/em&gt; have an easier time understanding the code change and therefore can give better feedback in a shorter time.&lt;/p&gt;
&lt;p&gt;So, are you ready to learn how to do it with just Git? Let’s go!&lt;/p&gt;
&lt;h2&gt;Feature Branch Workflow vs. Stacked Pull Requests&lt;/h2&gt;
&lt;p&gt;To understand the value of stacked-PRs, let’s first look at the
traditional &lt;a href=&quot;https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow&quot;&gt;feature-branch workflow&lt;/a&gt;
and its limitations, and then contrast it with the stacked-branch workflow.&lt;/p&gt;
&lt;h3&gt;The Traditional Feature Branch Workflow&lt;/h3&gt;
&lt;p&gt;Imagine we’re working on a new feature: “adding and deleting items from a shopping cart.”&lt;/p&gt;
&lt;p&gt;With a feature-branch workflow, we would branch off from the &lt;code&gt;main&lt;/code&gt; branch to
implement this feature in isolation on its own dedicated branch.
This means we would commit all the changes related to this feature, probably
using multiple commits, on this branch.
After finishing, we open &lt;u&gt;one&lt;/u&gt; pull request, and after approval merge
the feature branch back into the &lt;code&gt;main&lt;/code&gt; branch.&lt;/p&gt;
&lt;p&gt;This approach is common, but it has downsides for code reviews:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;By the time we open a pull request, the feature branch often contains hundreds of lines of changes (several hundred lines of code is typical). &lt;a href=&quot;https://smartbear.com/learn/code-review/best-practices-for-peer-code-review/&quot;&gt;Research&lt;/a&gt; shows this is already past the point where reviews are most effective.&lt;/li&gt;
&lt;li&gt;The reviewer’s only option to break the review into smaller chunks is by following our commit history. But commits reflect the developer’s thought process, not necessarily coherent review units.&lt;/li&gt;
&lt;li&gt;Commits may contain partial work, reversals, or multiple iterations of the same idea—making them harder to review meaningfully. You will find a more detailed &lt;a href=&quot;#commit-based-reviews&quot;&gt;comparison to commit-based reviews&lt;/a&gt; at the end.&lt;/li&gt;
&lt;li&gt;Even if you open a WIP pull request to promote early review, the reviewer will see the code changing continually, making it hard to track progress or provide feedback.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 678px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/c4282dfaebba750e365e19403d31f611/38cea/Feature-Branch-Development.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 40.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAABJ0AAASdAHeZh94AAABK0lEQVQoz3WQyU7DMBRF8//fwAbYsEWqhMqCFZsKBFIrNi1IHULnxEPSNoPtg+qkQ4A+6ej6ebh61wF1OecamqYpsRAopTDGYJ3DOlvj/L0D5++C32aHtS0tMpaeIiswuaH0WmIKw6mapkHDrL4SRnPu+8/cfTxx02t7rt5b3PYeue4+0Bp0mH6/oOXoj2mwV3tmKoQgloLP6JvBMmSq1kx1xEQuCdWaUK1YJAqTKTI9Q6qkSlSnCzjMZQ1aCkyR+zbTCcn+D6OY9XxOKhX/1W6Tkm+S46SBKqAbGYZLSbSzKANx7jyioCKvOO773hFnjqSEt3FMXxp0AcFsC+3QMk4dI234EjlDZZik+L1LTGqdbR2vEXRW+HUduYq90YpotSDV8hihCRf0dP4DDI5qJrGSy9sAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Working with feature branches.&quot;
        title=&quot;Working with feature branches.&quot;
        src=&quot;/static/c4282dfaebba750e365e19403d31f611/38cea/Feature-Branch-Development.png&quot;
        srcset=&quot;/static/c4282dfaebba750e365e19403d31f611/5a46d/Feature-Branch-Development.png 300w,
/static/c4282dfaebba750e365e19403d31f611/0a47e/Feature-Branch-Development.png 600w,
/static/c4282dfaebba750e365e19403d31f611/38cea/Feature-Branch-Development.png 678w&quot;
        sizes=&quot;(max-width: 678px) 100vw, 678px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;figcaption class=&quot;wp-element-caption&quot;&gt;Working with feature branches.&lt;/figcaption&gt;&lt;/p&gt;
&lt;h3&gt;The Stacked Pull Request Workflow&lt;/h3&gt;
&lt;p&gt;Instead of cramming everything into a single branch and PR, stacked pull requests let us break the feature into smaller, coherent units of work.&lt;/p&gt;
&lt;p&gt;Here’s how it works:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Each sub-task of the feature lives on its own branch.&lt;/li&gt;
&lt;li&gt;These branches are “stacked” on top of each other, so they build in sequence.&lt;/li&gt;
&lt;li&gt;Each branch becomes its own pull request—self-contained and reviewable.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What’s in it for reviewers?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;They review coherent work items, not arbitrary commits.&lt;/li&gt;
&lt;li&gt;They can provide feedback earlier, while the feature is still in progress.&lt;/li&gt;
&lt;li&gt;Reviews are faster, clearer, and closer to the actual work being done.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What’s in it for the developer and the team?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can keep working on the feature while earlier sub-tasks are already under review.&lt;/li&gt;
&lt;li&gt;Feedback comes in earlier, so you can adapt your approach before finishing the whole feature.&lt;/li&gt;
&lt;li&gt;Branches stay short-lived and easier to manage, reducing painful merges.&lt;/li&gt;
&lt;li&gt;The team builds a shared understanding of the feature as it evolves, instead of waiting until the end.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;In short: stacked PRs turn one overwhelming, oversized review into a series of focused, high-quality reviews—helping both the author and the team.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Note that stacked pull requests are also useful during trunk-based development.
Always if we have made many changes (more than, say, 400 lines of code) and we
want to ease the burden on the reviewers.&lt;/p&gt;
&lt;h2&gt;Let’s look at an example:&lt;/h2&gt;
&lt;p&gt;To split our features “&lt;em&gt;adding and removing items from and to a shopping cart&lt;/em&gt;” into several work items, we can, for example, decide to go with an approach reflecting our system’s architecture.&lt;/p&gt;
&lt;p&gt;Based on this decision, we start by making changes to the database layer. Then, we implement the business logic. And finally, we made the necessary changes to the UI.&lt;/p&gt;
&lt;h2&gt;Working with Stacked Pull Requests&lt;/h2&gt;
&lt;p&gt;We begin our work by creating a feature branch for the first set of changes (let’s call it &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt;, for indicating that we work on this branch on the database layer for the feature).&lt;/p&gt;
&lt;p&gt;The git command we need for this is the git command to create a branch and check it out:&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 843px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/76df30a153f0a9220887f5a3d1966c3a/e7b56/git-command-checkout.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 6.666666666666667%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAABABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAIF/8QAFQEBAQAAAAAAAAAAAAAAAAAAAQD/2gAMAwEAAhADEAAAAcOQgT//xAAUEAEAAAAAAAAAAAAAAAAAAAAQ/9oACAEBAAEFAn//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/AT//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/AT//xAAUEAEAAAAAAAAAAAAAAAAAAAAQ/9oACAEBAAY/An//xAAVEAEBAAAAAAAAAAAAAAAAAAABEP/aAAgBAQABPyFv/9oADAMBAAIAAwAAABBwD//EABYRAAMAAAAAAAAAAAAAAAAAAAEQMf/aAAgBAwEBPxARf//EABURAQEAAAAAAAAAAAAAAAAAAAEQ/9oACAECAQE/EGf/xAAYEAACAwAAAAAAAAAAAAAAAAABMQAQcf/aAAgBAQABPxBDlFz/2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;git checkout -b fb-database&quot;
        title=&quot;git checkout -b fb-database&quot;
        src=&quot;/static/76df30a153f0a9220887f5a3d1966c3a/e7b56/git-command-checkout.jpg&quot;
        srcset=&quot;/static/76df30a153f0a9220887f5a3d1966c3a/f93b5/git-command-checkout.jpg 300w,
/static/76df30a153f0a9220887f5a3d1966c3a/b4294/git-command-checkout.jpg 600w,
/static/76df30a153f0a9220887f5a3d1966c3a/e7b56/git-command-checkout.jpg 843w&quot;
        sizes=&quot;(max-width: 843px) 100vw, 843px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;git checkout -b fb-database&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;As you can see from the screenshot, we are on the &lt;code class=&quot;language-text&quot;&gt;development &lt;/code&gt;branch before we create the *&lt;code class=&quot;language-text&quot;&gt;fb-database &lt;/code&gt;*branch. With this command, we now create the &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt; branch and also switch to it.&lt;/p&gt;
&lt;p&gt;Then, we do our work and make several frequent commits until we reach a state where we think the database layer is in a good shape.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;git add [somefilesthatchanged anotherfile yetanotherfile]&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now, we push create a remote branch for &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt; and push our changes to it.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;git push --set-upstream origin fb-database&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then, we open a pull request just for those coherent database-changes.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 978px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/41df610297780594bfc12b6da6034618/614df/open-pull-requests.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 25.666666666666664%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAFABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAMF/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/2gAMAwEAAhADEAAAAdqggV//xAAWEAEBAQAAAAAAAAAAAAAAAAABEBH/2gAIAQEAAQUCHSf/xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/AT//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/AT//xAAVEAEBAAAAAAAAAAAAAAAAAAAQEf/aAAgBAQAGPwKv/8QAFRABAQAAAAAAAAAAAAAAAAAAERD/2gAIAQEAAT8hNA3/2gAMAwEAAgADAAAAEIwf/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPxA//8QAGBABAQEBAQAAAAAAAAAAAAAAAREAMVH/2gAIAQEAAT8QAGwsvMKg3ur7v//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Opening the first pull request for this review stack.&quot;
        title=&quot;Opening the first pull request for this review stack.&quot;
        src=&quot;/static/41df610297780594bfc12b6da6034618/614df/open-pull-requests.jpg&quot;
        srcset=&quot;/static/41df610297780594bfc12b6da6034618/f93b5/open-pull-requests.jpg 300w,
/static/41df610297780594bfc12b6da6034618/b4294/open-pull-requests.jpg 600w,
/static/41df610297780594bfc12b6da6034618/614df/open-pull-requests.jpg 978w&quot;
        sizes=&quot;(max-width: 978px) 100vw, 978px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;figcaption class=&quot;wp-element-caption&quot;&gt;Opening the first pull request for this review stack.&lt;/figcaption&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; An even better approach is to open a “Work in progress” pull request as soon as we create the branch. This way, our colleagues can follow our progress and get already a heads-up on our work.&lt;/p&gt;
&lt;p&gt;Opening this pull request will look exactly like we would do for any pull request. We open a pull request comparing the code of branch &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt; to the code on the &lt;code class=&quot;language-text&quot;&gt;development&lt;/code&gt; branch.&lt;/p&gt;
&lt;p&gt;This means that reviewers see the changes that we made in comparison to what happened in the development branch. Right now, there is no difference from the example before (except that there are fewer changes that happened in this pull request).&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 392px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/99de8b8b4839383d4fe00d31d5c9bdc5/3324e/stacked-pull-request-pr1-1.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 47%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAJABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAECBf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAHdi7RDD//EABcQAQEBAQAAAAAAAAAAAAAAAAARARD/2gAIAQEAAQUCqK3v/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFhAAAwAAAAAAAAAAAAAAAAAAACAy/9oACAEBAAY/Ail//8QAGhAAAgIDAAAAAAAAAAAAAAAAADEBERBBUf/aAAgBAQABPyGkqRmKdNc//9oADAMBAAIAAwAAABDEP//EABYRAQEBAAAAAAAAAAAAAAAAAAARIf/aAAgBAwEBPxCNf//EABURAQEAAAAAAAAAAAAAAAAAABAh/9oACAECAQE/EIf/xAAeEAABAwQDAAAAAAAAAAAAAAARAAExECFhcZHR8P/aAAgBAQABPxASzsomIjmS3XisLlS3r//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;stacked pull request pr1 1&quot;
        title=&quot;stacked pull request pr1 1&quot;
        src=&quot;/static/99de8b8b4839383d4fe00d31d5c9bdc5/3324e/stacked-pull-request-pr1-1.jpg&quot;
        srcset=&quot;/static/99de8b8b4839383d4fe00d31d5c9bdc5/f93b5/stacked-pull-request-pr1-1.jpg 300w,
/static/99de8b8b4839383d4fe00d31d5c9bdc5/3324e/stacked-pull-request-pr1-1.jpg 392w&quot;
        sizes=&quot;(max-width: 392px) 100vw, 392px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;figcaption class=&quot;wp-element-caption&quot;&gt;   
First stacked pull request – similar to feature branch-based workflow &lt;/figcaption&gt;
&lt;h2&gt;Creating the first stacked pull request&lt;/h2&gt;
&lt;p&gt;After we finish our first work item, we continue to work on the next work item for our feature. But instead of creating another feature branch based on the &lt;em&gt;development&lt;/em&gt; branch, we create a branch that is based on the previous branch &lt;em&gt;fb-database&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 888px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/2f477cdf53e2551958155a76be6e1ad8/bf093/git-command-checkout-business-logic.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 5%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAABABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAIF/8QAFgEBAQEAAAAAAAAAAAAAAAAAAQAC/9oADAMBAAIQAxAAAAHEgIHP/8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQABBQJ//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQAGPwJ//8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQABPyF//9oADAMBAAIAAwAAABAAP//EABYRAAMAAAAAAAAAAAAAAAAAAAEQMf/aAAgBAwEBPxARf//EABURAQEAAAAAAAAAAAAAAAAAAAEQ/9oACAECAQE/EGf/xAAVEAEBAAAAAAAAAAAAAAAAAAAQUf/aAAgBAQABPxCv/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;git checkout command&quot;
        title=&quot;git checkout command&quot;
        src=&quot;/static/2f477cdf53e2551958155a76be6e1ad8/bf093/git-command-checkout-business-logic.jpg&quot;
        srcset=&quot;/static/2f477cdf53e2551958155a76be6e1ad8/f93b5/git-command-checkout-business-logic.jpg 300w,
/static/2f477cdf53e2551958155a76be6e1ad8/b4294/git-command-checkout-business-logic.jpg 600w,
/static/2f477cdf53e2551958155a76be6e1ad8/bf093/git-command-checkout-business-logic.jpg 888w&quot;
        sizes=&quot;(max-width: 888px) 100vw, 888px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;This means that all the changes we made on the branch &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt;, are already part of the code on this new feature branch, i.e. &lt;code class=&quot;language-text&quot;&gt;fb-businesslogic&lt;/code&gt;. It also means that we can continue working without being blocked, while others have the time to review our previous changes.&lt;/p&gt;
&lt;p&gt;So, now, we are working on the changes to the business logic. And again, we open a pull request.&lt;/p&gt;
&lt;p&gt;But now, this pull request isn’t based on the &lt;em&gt;development&lt;/em&gt; branch. Instead, it is based on the branch &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1035px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/0e661d9db793018b84f4ae06c960e243/af659/open-pull-requests-different-branch.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 24.333333333333332%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAFABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAIF/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEAMQAAAB3KAD/8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQABBQJ//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQAGPwJ//8QAGBAAAgMAAAAAAAAAAAAAAAAAAREQITH/2gAIAQEAAT8hBprZ/9oADAMBAAIAAwAAABADz//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8QP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8QP//EABgQAQEBAQEAAAAAAAAAAAAAAAERACFR/9oACAEBAAE/EDQIgcVBu77v/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Opening the second pull request command&quot;
        title=&quot;Opening the second pull request command&quot;
        src=&quot;/static/0e661d9db793018b84f4ae06c960e243/af659/open-pull-requests-different-branch.jpg&quot;
        srcset=&quot;/static/0e661d9db793018b84f4ae06c960e243/f93b5/open-pull-requests-different-branch.jpg 300w,
/static/0e661d9db793018b84f4ae06c960e243/b4294/open-pull-requests-different-branch.jpg 600w,
/static/0e661d9db793018b84f4ae06c960e243/af659/open-pull-requests-different-branch.jpg 1035w&quot;
        sizes=&quot;(max-width: 1035px) 100vw, 1035px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;figcaption class=&quot;wp-element-caption&quot;&gt;Opening the second pull request – this one is based in &lt;em&gt;fb-database&lt;/em&gt;&lt;/figcaption&gt;&lt;/p&gt;
&lt;p&gt;This highlights that those changes are connected, and, as a result, the reviewer sees what changed between the &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt; and the &lt;code class=&quot;language-text&quot;&gt;fb-businesslogic&lt;/code&gt; branch.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 566px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/94a07355ca7902f0217a17f433787cc2/a0966/stacked-pull-request-business.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 53.333333333333336%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAALABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAIBBf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAHvTWoC/wD/xAAXEAEAAwAAAAAAAAAAAAAAAAABACAx/9oACAEBAAEFAlm1/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFhAAAwAAAAAAAAAAAAAAAAAAACBB/9oACAEBAAY/Air/AP/EABoQAAMAAwEAAAAAAAAAAAAAAAABERAhQVH/2gAIAQEAAT8hhxsd8hCW4TH/2gAMAwEAAgADAAAAEETP/8QAFREBAQAAAAAAAAAAAAAAAAAAECH/2gAIAQMBAT8Qp//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8QP//EAB4QAQACAQQDAAAAAAAAAAAAAAEAESExQVFxYYGR/9oACAEBAAE/EMGuhtKAjTxU0aJ3AvlQcsp5+sADF+2f/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;stacked pull request business&quot;
        title=&quot;stacked pull request business&quot;
        src=&quot;/static/94a07355ca7902f0217a17f433787cc2/a0966/stacked-pull-request-business.jpg&quot;
        srcset=&quot;/static/94a07355ca7902f0217a17f433787cc2/f93b5/stacked-pull-request-business.jpg 300w,
/static/94a07355ca7902f0217a17f433787cc2/a0966/stacked-pull-request-business.jpg 566w&quot;
        sizes=&quot;(max-width: 566px) 100vw, 566px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;figcaption class=&quot;wp-element-caption&quot;&gt;&lt;br&gt;
Two stacked pull requests based on two consecutive branched (&lt;em&gt;fb-databas&lt;/em&gt;e and &lt;em&gt;fb-businesslogi&lt;/em&gt;c)&lt;/figcaption&gt;&lt;/p&gt;
&lt;p&gt;So, now we have implemented the UI changes. And once again, we branch off our previous feature branch (&lt;code class=&quot;language-text&quot;&gt;fb-businesslogic&lt;/code&gt;) to make those changes. We also open another pull request. Again, the PR points to the previous feature branch &lt;code class=&quot;language-text&quot;&gt;fb-businesslogic&lt;/code&gt;, instead of to the &lt;code class=&quot;language-text&quot;&gt;development&lt;/code&gt; branch.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 753px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/d10a4db9961b7b3d8037f860d62cbfad/87a16/Final-stacked-pull-requests-database-business-ui.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 52.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAKABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAECBf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAHvTRIo/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABBQJf/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQAGPwJf/8QAGhABAAMAAwAAAAAAAAAAAAAAAQARIRAxYf/aAAgBAQABPyFfLlL3pDCUSuP/2gAMAwEAAgADAAAAEJv/AP/EABURAQEAAAAAAAAAAAAAAAAAAAAR/9oACAEDAQE/EFf/xAAVEQEBAAAAAAAAAAAAAAAAAAAAEf/aAAgBAgEBPxCI/8QAGxABAAIDAQEAAAAAAAAAAAAAAQARIVFhQZH/2gAIAQEAAT8QpSl0Ru+zBRiHAFHCGg+SmiUaJ//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Final stacked pull requests database business ui&quot;
        title=&quot;Final stacked pull requests database business ui&quot;
        src=&quot;/static/d10a4db9961b7b3d8037f860d62cbfad/87a16/Final-stacked-pull-requests-database-business-ui.jpg&quot;
        srcset=&quot;/static/d10a4db9961b7b3d8037f860d62cbfad/f93b5/Final-stacked-pull-requests-database-business-ui.jpg 300w,
/static/d10a4db9961b7b3d8037f860d62cbfad/b4294/Final-stacked-pull-requests-database-business-ui.jpg 600w,
/static/d10a4db9961b7b3d8037f860d62cbfad/87a16/Final-stacked-pull-requests-database-business-ui.jpg 753w&quot;
        sizes=&quot;(max-width: 753px) 100vw, 753px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;figcaption class=&quot;wp-element-caption&quot;&gt;  
Three stacked pull requests based on three consecutive branched (*fb-database, fb-businesslogic, fb-ui*)&lt;/figcaption&gt;
&lt;h2&gt;Reviewing Stacked Pull Requests&lt;/h2&gt;
&lt;p&gt;So, how do we review those stacked pull requests?&lt;/p&gt;
&lt;p&gt;The idea is that the reviewer starts with the pull request that was opened first. Then, they compare the code on the development branch with the code on the fb-database branch. These are also the first changes we made, and all other changes build upon those.&lt;/p&gt;
&lt;p&gt;As a next step, the reviewer reviews the pull request containing the business logic. And finally, the reviewer reviews the pull request with the UI changes.&lt;/p&gt;
&lt;p&gt;So the review direction is: &lt;code class=&quot;language-text&quot;&gt;fb-database -&gt; fb-businesslogic -&gt; fb-ui&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Merging stacked Pull Requests&lt;/h2&gt;
&lt;p&gt;It’s important that reviewers &lt;strong&gt;do not merge&lt;/strong&gt; code changes right after they review them. All stacked pull requests should be treated as &lt;em&gt;Work In Progress&lt;/em&gt; pull requests until all stacked pull requests have been reviewed.
This is because, we &lt;em&gt;must&lt;/em&gt; start merging from the top, i.e., the last opened pull request.
Doing otherwise will result in a state where we cannot merge our pull requests anymore.&lt;/p&gt;
&lt;p&gt;In our example, once the reviewers reviewed all pull requests, we would merge the UI changes into the business logic changes.
Then, we merge the business logic changes into the database changes.
Finally, we merge the changes on the branch &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt; (which now comprises all changes) into the &lt;code class=&quot;language-text&quot;&gt;development&lt;/code&gt; branch.&lt;/p&gt;
&lt;p&gt;So, our merge direction is: &lt;code class=&quot;language-text&quot;&gt;fb-ui -&gt; fb-businesslogic -&gt; fb- database&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 790px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/d47735c394a3861cca44ef124a702a02/b1591/Final-stacked-pull-requests-database-business-ui-merge.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 50.66666666666667%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAKABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAECBf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAHvSaSA/8QAFRABAQAAAAAAAAAAAAAAAAAAESD/2gAIAQEAAQUCa//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEABj8CX//EABkQAAIDAQAAAAAAAAAAAAAAAAABEBExIf/aAAgBAQABPyF0OvcLoU//2gAMAwEAAgADAAAAEKsv/8QAFREBAQAAAAAAAAAAAAAAAAAAABH/2gAIAQMBAT8Qqv/EABURAQEAAAAAAAAAAAAAAAAAAAAR/9oACAECAQE/EIj/xAAcEAEAAgIDAQAAAAAAAAAAAAABABEhMRBRgdH/2gAIAQEAAT8QJg230XG9MLYqxhoV9fs2eEF0T//Z&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Merge directions of stacked pull requests&quot;
        title=&quot;Merge directions of stacked pull requests&quot;
        src=&quot;/static/d47735c394a3861cca44ef124a702a02/b1591/Final-stacked-pull-requests-database-business-ui-merge.jpg&quot;
        srcset=&quot;/static/d47735c394a3861cca44ef124a702a02/f93b5/Final-stacked-pull-requests-database-business-ui-merge.jpg 300w,
/static/d47735c394a3861cca44ef124a702a02/b4294/Final-stacked-pull-requests-database-business-ui-merge.jpg 600w,
/static/d47735c394a3861cca44ef124a702a02/b1591/Final-stacked-pull-requests-database-business-ui-merge.jpg 790w&quot;
        sizes=&quot;(max-width: 790px) 100vw, 790px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;figcaption class=&quot;wp-element-caption&quot;&gt;The merge direction of stacked pull requests follows the orange arrows.&lt;/figcaption&gt;
&lt;h2&gt;Handling Feedback and Keeping Branches in Sync&lt;/h2&gt;
&lt;p&gt;One drawback of the stacked pull request approach is the overhead of branches that we need to keep in sync.&lt;/p&gt;
&lt;p&gt;For example, if a reviewer comments on our pull request handling with the database changes, we would make the requested changes on branch &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt;. But this means that we have to update and sync the &lt;code class=&quot;language-text&quot;&gt;fb-businesslogic&lt;/code&gt; and the &lt;code class=&quot;language-text&quot;&gt;fb-ui&lt;/code&gt; branch.&lt;/p&gt;
&lt;p&gt;Let’s imagine we changed the &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt; branch after receiving some feedback. Now, we have to update the &lt;code class=&quot;language-text&quot;&gt;fb-businesslogic&lt;/code&gt; branch. We have at least two options to sync our branches:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;merge the two branches (resulting in 1 merge commit on branch &lt;code class=&quot;language-text&quot;&gt;fb-businesslogic&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;rebasing the &lt;code class=&quot;language-text&quot;&gt;fb-businesslogic&lt;/code&gt; branch on the changes of branch &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For both options, we first have to commit and push the changes to the &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt; branch. Then, we switch to the &lt;code class=&quot;language-text&quot;&gt;fb-businesslogic&lt;/code&gt; branch, which we want to “know” of the changes on &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;git checkout fb-businesslogic&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Sync using git merge:&lt;/h2&gt;
&lt;p&gt;On the &lt;code class=&quot;language-text&quot;&gt;fb-bussinesslogic&lt;/code&gt; branch, we use the merge command. Then, we push the merge commit to the remote &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt; branch so it’s visible in the pull request:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;git merge fb-database 
git push&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That’s it. &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt; and &lt;code class=&quot;language-text&quot;&gt;fb-businesslogic&lt;/code&gt; are in sync again. Now, we can do the same for &lt;code class=&quot;language-text&quot;&gt;fb-businesslogic&lt;/code&gt; and &lt;code class=&quot;language-text&quot;&gt;fb-ui&lt;/code&gt;. If we have merge conflicts, we have to resolve them first and then commit and push our changes.&lt;/p&gt;
&lt;h3&gt;Sync using the git rebase:&lt;/h3&gt;
&lt;p&gt;We can achieve a similar result by using the &lt;em&gt;git rebase&lt;/em&gt; command. So, after we applied our changes to &lt;code class=&quot;language-text&quot;&gt;fb-database&lt;/code&gt; and switch to the branch &lt;code class=&quot;language-text&quot;&gt;fb-businesslogic&lt;/code&gt;, we use rebase to sync the changes.&lt;/p&gt;
&lt;p&gt;If there is no merge conflict, we are fine. Otherwise, we have to resolve the merge conflict, and then continue the rebase using the command:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;git rebase fb-database 
[git rebase --continue] #optional if you have merge conflicts
git push&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 962px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/c1dde32aa4c443c376e3c4c4b6e3851a/82d6d/SyncBranchesComplete.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 111.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAWABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAIDAQX/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAHxs7gh0bwGQP/EABYQAQEBAAAAAAAAAAAAAAAAAAEQIP/aAAgBAQABBQLaT//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EABQQAQAAAAAAAAAAAAAAAAAAADD/2gAIAQEABj8CH//EABoQAQADAAMAAAAAAAAAAAAAAAEAEBEhQVH/2gAIAQEAAT8hSO+Rjx3FrBiZu1//2gAMAwEAAgADAAAAEGMAPP/EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8QH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8QH//EAB4QAQACAQQDAAAAAAAAAAAAAAEAESExQZHhcYHR/9oACAEBAAE/EFNAeZVZzIrYqfEZxmvMcvZHQWe4BW0bRW+p/9k=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;All commands to apply changes&quot;
        title=&quot;All commands to apply changes&quot;
        src=&quot;/static/c1dde32aa4c443c376e3c4c4b6e3851a/82d6d/SyncBranchesComplete.jpg&quot;
        srcset=&quot;/static/c1dde32aa4c443c376e3c4c4b6e3851a/f93b5/SyncBranchesComplete.jpg 300w,
/static/c1dde32aa4c443c376e3c4c4b6e3851a/b4294/SyncBranchesComplete.jpg 600w,
/static/c1dde32aa4c443c376e3c4c4b6e3851a/82d6d/SyncBranchesComplete.jpg 962w&quot;
        sizes=&quot;(max-width: 962px) 100vw, 962px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;figcaption class=&quot;wp-element-caption&quot;&gt;Complete sync commands starting from applying changes to fb-database&lt;/figcaption&gt;&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;We looked at a technique called &lt;em&gt;stacked pull requests&lt;/em&gt; that can help code reviewers understand larger code changes more easily. Stackedpull requests allow you to break up large code changes and to create dependent pull requests that improve the code review process for the reviewer.&lt;/p&gt;
&lt;p&gt;Even if the process looks tedious or scary to you, I hope you take the time to try it out on your own. Only that way you can see whether this technique makes sense for you.&lt;/p&gt;
&lt;p&gt;Maybe you need to do it a couple of times (2-3 pull requests) before you get the hang of it. But after that, you will be used to this workflow and have integrated it into your daily routine.&lt;/p&gt;
&lt;p&gt;Now, before I let you go, let’s compare stacked pull requests to commit-based code reviews.&lt;/p&gt;
&lt;h2&gt;Comparison to commit-based code reviews&lt;/h2&gt;
&lt;p&gt;Most tools, such as GitHub, GitLab, and Bitbucket, provide you with a list of commits that happened within a pull request.&lt;/p&gt;
&lt;p&gt;This is handy because reviewers can click on each of the commits and see what changed just within that commit.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 970px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/bdfbe1faed3af3ba12a8ee808c219fc2/ec7ce/Commit-Based-Reviews.jpg&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 63.66666666666666%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAIF/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEAMQAAAB3KmwD//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAQUCX//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEABj8CX//EABkQAQACAwAAAAAAAAAAAAAAAAEQIQARMf/aAAgBAQABPyEKt2ydgz//2gAMAwEAAgADAAAAEMAP/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPxA//8QAGRABAAMBAQAAAAAAAAAAAAAAAQARMUFx/9oACAEBAAE/EGoH0oAgVwhNPWI1sxP/2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Review tree&quot;
        title=&quot;Review tree&quot;
        src=&quot;/static/bdfbe1faed3af3ba12a8ee808c219fc2/ec7ce/Commit-Based-Reviews.jpg&quot;
        srcset=&quot;/static/bdfbe1faed3af3ba12a8ee808c219fc2/f93b5/Commit-Based-Reviews.jpg 300w,
/static/bdfbe1faed3af3ba12a8ee808c219fc2/b4294/Commit-Based-Reviews.jpg 600w,
/static/bdfbe1faed3af3ba12a8ee808c219fc2/ec7ce/Commit-Based-Reviews.jpg 970w&quot;
        sizes=&quot;(max-width: 970px) 100vw, 970px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In theory, reviewing the code changes based on commits means that the reviewers review smaller code changes and also that they can follow the progress of the developer.&lt;/p&gt;
&lt;h3 id=&quot;commit-based-reviews&quot;&gt;The problem of commit-based reviews&lt;/h3&gt;
&lt;p&gt;Unfortunately, most of the time commits represent the developer’s progress and aren’t meant to ease the review. This means that in some cases, the reviewer might look at changes that are undone in a subsequent commit. Also, often commits tangle together several unrelated changes.&lt;/p&gt;
&lt;p&gt;Some commits might not even compile, or they aren’t tested. Well, from experience, I can say that many developers have a hard time committing coherent, self-contained, and working commits. Commits often just represent progress points of the developer (like breakpoints before leaving the office or going for lunch).&lt;/p&gt;
&lt;p&gt;Still, reviewing based on commits is frequently done because when we face large pull requests, we might clutch any straw we can get.&lt;/p&gt;
&lt;p&gt;But even if our commits represent great reviewable items, like containing all the changes we made on each individual branch, commit-based reviews still have a main drawback to the stacked pull-request approach:&lt;/p&gt;
&lt;p&gt;Reviewers cannot approve, reject, or ask for changes on the level of individual commits. Even commenting on code changes of a singular commit is handled differently from commenting on the whole pull request. Leaving comments on a particular commit might be hard to trace for the code author and reviewer, as they do not show up in the pull request discussion.&lt;/p&gt;
&lt;h2&gt;Related work&lt;/h2&gt;
&lt;p&gt;Well, I hope I have given you a good summary of the stacked pull request approach.
This should serve as another mental model and workflow to deal with code reviews within GitHub, GitLab, or Bitbucket.&lt;/p&gt;
&lt;p&gt;Finally, I want to highlight some other blog posts that discuss the topic of stacked pull requests:&lt;br&gt;
Unfortunately, the post of Grayson Koonce is not available anymore. Yet, here is a short comparison to the approach I explained: Grayson highlights a workflow in which the developer isn’t working on several branches as they do the work.&lt;/p&gt;
&lt;p&gt;Instead, they create the stacked pull requests in retrospective by &lt;code class=&quot;language-text&quot;&gt;unstaging&lt;/code&gt; all committed changes from a single branch and using &lt;code class=&quot;language-text&quot;&gt;git add --patch&lt;/code&gt; command to divide the work.&lt;/p&gt;
&lt;p&gt;Tip: When you have large code reviews, it can be a great practice exercise that I also sometimes use in my workshops
to break up large code changes with this technique in retrospective.&lt;br&gt;
Note, though, that it is an error-prone and daunting task to manually separate the changes.
till, you can learn a lot about single code coherence, the single responsibility principle, and your habit of mingling and tangling unrelated changes together.&lt;/p&gt;
&lt;p&gt;Finally, &lt;code class=&quot;language-text&quot;&gt;git add patch&lt;/code&gt;  is a wonderful tool when you are dealing with relatively small and local changes that you want to separate. I use it on a regular basis. And the new git command &lt;code class=&quot;language-text&quot;&gt;--update-refs&lt;/code&gt; is also helpful to synch changes between branches.&lt;/p&gt;
&lt;p&gt;This &lt;a href=&quot;https://medium.com/@kurtisnusbaum/stacked-diffs-keeping-phabricator-diffs-small-d9964f4dcfa6&quot;&gt;blog post&lt;/a&gt; describes this technique when working with the Phabricator code review tool.&lt;/p&gt;
&lt;p&gt;On StackOverflow, several people discuss &lt;a href=&quot;https://stackoverflow.com/questions/26619478/are-dependent-pull-requests-in-github-possible&quot;&gt;how to generate dependent pull requests&lt;/a&gt;, and there are a couple of good suggestions on how to overcome this limitation in GitHub.&lt;/p&gt;
&lt;p&gt;Over the last few years, also tools appeared that automate or assist with the creation of dedicated review branches.
One of the most sophisticated ones is &lt;a href=&quot;https://graphite.dev/&quot;&gt;Graphite&lt;/a&gt;. Also several open source CLI tools emerged, such as &lt;a href=&quot;https://github.com/ezyang/ghstack&quot;&gt;ghStack&lt;/a&gt;, &lt;a href=&quot;https://www.git-town.com/&quot;&gt;git town&lt;/a&gt;, or &lt;a href=&quot;https://github.com/ejoffe/spr&quot;&gt;Spr&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;BTW, next to my &lt;a href=&quot;/workshops/&quot;&gt;code review workshops&lt;/a&gt;, I also run a &lt;a href=&quot;https://www.michaelagreiler.com/subscribe/&quot;&gt;newsletter&lt;/a&gt; providing you with awesome code review tips every other week. If that sounds interesting, get your bi-weekly dose of code review best practices below!&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Manual Stacked Pull Requests”: &lt;a href=&quot;https://www.awesomecodereviews.com/best-practices/stacked-pull-requests/&quot;&gt;https://www.awesomecodereviews.com/best-practices/stacked-pull-requests/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2025-09-17T09:59:30+01:00&quot;&gt;September 17, 2025&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[How to Give Respectful and Constructive Code Review Feedback]]></title><description><![CDATA[Respectful and constructive code review feedback is the basis for a fruitful and positive collaboration. In this article, you learn 1…]]></description><link>https://www.awesomecodereviews.com/respectful-constructive-code-review-feedback/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/respectful-constructive-code-review-feedback/</guid><pubDate>Tue, 10 Mar 2020 16:26:30 GMT</pubDate><content:encoded>&lt;p&gt;Respectful and constructive code review feedback is the basis for a fruitful and positive collaboration. In this article, you learn 10 actionable tips to get your code review feedback across in an empathic and compassionate way.&lt;/p&gt;
&lt;div class=&quot;gatsby-resp-iframe-wrapper&quot; style=&quot;padding-bottom: 56.25%; position: relative; height: 0; overflow: hidden; margin-bottom: 1.0725rem&quot; &gt; &lt;figure class=&quot;wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio&quot;&gt;&lt;div class=&quot;wp-block-embed__wrapper&quot;&gt;&lt;span class=&quot;embed-youtube&quot; style=&quot;text-align:center; display: block;&quot;&gt;&lt;iframe allowfullscreen=&quot;true&quot; class=&quot;youtube-player&quot; src=&quot;https://www.youtube.com/embed/NNXk_WJzyMI&quot; style=&quot;border:0; position: absolute; top: 0; left: 0; width: 100%; height: 100%; &quot; type=&quot;text/html&quot;&gt;&lt;/iframe&gt;&lt;/span&gt;&lt;/div&gt;&lt;/figure&gt; &lt;/div&gt;
&lt;figcaption&gt;How to give respectful and compassionate code reviews&lt;/figcaption&gt;&lt;/figure&gt;
&lt;h2&gt;Compassion &gt; Preciseness for code review feedback&lt;/h2&gt;
&lt;p&gt;In work environments, we focus on productivity. As engineers, we pat ourselves on the back because of our brevity and preciseness.&lt;/p&gt;
&lt;p&gt;Still, during code reviews, this isn’t the best strategy. Taking the time to carefully phrase the code review feedback is crucial.&lt;br&gt;
In &lt;a href=&quot;/workshops/&quot;&gt;my code review workshops&lt;/a&gt;, I often see developers who are reviewing code get into a problem-solving state of mind.
In this mode, they fall back to a note-taking style of communication.&lt;/p&gt;
&lt;p&gt;This results in code review comments such as &lt;code class=&quot;language-text&quot;&gt;Rename to sendMessage.&lt;/code&gt; or &lt;code class=&quot;language-text&quot;&gt;Remove this. Unnecessary.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;But that’s not the right way to build relationships and collaborate with your peers during a pull request.
Comments like these contribute to a harsh code review feedback culture and can lead to toxic work environments.&lt;/p&gt;
&lt;p&gt;So, before you start a code review, make sure you take the time to carefully phrase your feedback. Recall that you aren’t giving instructions to a computer but communicating with other human beings.&lt;/p&gt;
&lt;p&gt;Now, let’s deep dive into the 10 tips to give respectful and constructive code review comments.&lt;/p&gt;
&lt;h2&gt;1. Ask questions during code review&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;The best way to foster a positive code review feedback culture is to ask questions instead of demanding changes. Asking questions about the code has many advantages. It opens a dialogue and acknowledges that neither the reviewer nor the code author is always right.&lt;/p&gt;
&lt;p&gt;Asking questions is also less confrontational. This means that the code author and the code reviewer can decide together on the right course of action. It also allows developers to discuss opinionated choices and learn from each other’s perspective.&lt;/p&gt;
&lt;p&gt;Example: Instead of saying, “This variable should be called &lt;code class=&quot;language-text&quot;&gt;userId&lt;/code&gt;,” you can ask, “What do you think about calling this variable &lt;code class=&quot;language-text&quot;&gt;userId&lt;/code&gt;?”&lt;/p&gt;
&lt;p&gt;Note: Rhetorical or feisty questions when commenting on pull requests, such as “Why didn’t you call the variable &lt;code class=&quot;language-text&quot;&gt;userId&lt;/code&gt;?” aren’t helpful.&lt;/p&gt;
&lt;p&gt;You might think that asking questions is not constructive code review feedback, but in fact, it is. It helps the code author to reflect and think about your input without getting defensive.&lt;/p&gt;
&lt;h2&gt;2. Make it about the code&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;When you phrase the code review feedback, it is an excellent strategy to avoid addressing the code author directly. Blaming the person instead of the code leads to justification, rejections, and defensive behavior.&lt;/p&gt;
&lt;p&gt;Example: Instead of saying &lt;code class=&quot;language-text&quot;&gt;&quot;You did not close the socket connection here.&quot;&lt;/code&gt;, you can say &lt;code class=&quot;language-text&quot;&gt;&quot;This code does not close the socket connection.&quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Blaming is never constructive code review feedback and won’t get you and your team far. See code reviews and coding as a team sport. Focus on facts and leave the blame game out of code reviews.&lt;/p&gt;
&lt;h2&gt;3. Clarify that it’s your perspective&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;While you should not blame the person writing the code, it is a good practice to use I-messages to show that the code review feedback comes from you. First and foremost, this signals that the feedback isn’t a universal statement or generalization but your observation, opinion, or perspective.&lt;/p&gt;
&lt;p&gt;Example: Instead of saying, “This code is hard to understand,” you can say, “It’s hard for me to understand this code.”&lt;/p&gt;
&lt;p&gt;Explicitly framing the comment as your view makes it more constructive because it distinguishes your experience from a universal claim.&lt;/p&gt;
&lt;p&gt;For example, if you say, “Longer variable names are always better,” the code author might disagree. The statement presents an opinion as a universal truth and generalizes with the word “always.” If you say instead, “I find longer variable names easier to understand,” you turn the comment into constructive feedback. The author might still disagree, but at least they have learned something about your perspective.&lt;/p&gt;
&lt;p&gt;It’s hard to argue against your perspective. This makes it easier for both sides to be open to looking for solutions.&lt;/p&gt;
&lt;h2&gt;4. No sarcasm when reviewing code&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;&lt;a href=&quot;https://web-docs.stern.nyu.edu/pa/kruger_email_ego.pdf&quot;&gt;Research on email communication&lt;/a&gt; shows that people can misread sarcasm in writing and that senders tend to overestimate how clearly they convey it. Even if you believe the other person will recognize a sarcastic pull request comment, they may not interpret it as you intended. Therefore, it’s safer to leave sarcasm out of code reviews and other written feedback.&lt;/p&gt;
&lt;h2&gt;5. No condescending words&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;Words such as “just,” “easy,” “only,” or “obvious” can come across as belittling and condescending. It’s a good practice to remove those words from your code review feedback when they do not add meaning. &lt;a href=&quot;https://www.youtube.com/watch?v=gsT2BBWBVmM&quot;&gt;Jim Fisher gives a good explanation of the problems these words can cause&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can use &lt;a href=&quot;https://alexjs.com/&quot;&gt;Alex.js&lt;/a&gt;, a linter with integrations for editors and CI tools, to flag potentially condescending language such as “obviously.”&lt;/p&gt;
&lt;p&gt;Example: &lt;code class=&quot;language-text&quot;&gt;Why didn&apos;t you just write the CSS in a separate file?&lt;/code&gt; sounds condescending and judgmental. Removing “just” improves the feedback: &lt;code class=&quot;language-text&quot;&gt;Why didn&apos;t you write the CSS in a separate file?&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This feedback could be interpreted as sincere curiosity. But was that how you interpreted it? Or did it still sound a bit taunting?&lt;/p&gt;
&lt;p&gt;Yeah, indeed. Many of us read this code comment as &lt;code class=&quot;language-text&quot;&gt;&quot;You should have written the CSS in a separate file.&quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Why? In written communication, we do not have additional cues such as body language, facial expressions, or tone of voice to help us interpret a message. As a result, readers may understand a sentence differently from how the writer intended it.&lt;/p&gt;
&lt;h2&gt;6. Use emojis carefully in your code review comments&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;Emojis can help convey tone when written feedback lacks facial expressions and body language. However, &lt;a href=&quot;https://doi.org/10.1145/3375629&quot;&gt;their interpretation varies&lt;/a&gt; by emoji and audience, so use them only as a supporting cue—not as a substitute for clear wording.&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;Would you be open to moving the CSS to a separate file? 🤔&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Here, the wording carries the respectful question; the emoji only supports its tone.&lt;/p&gt;
&lt;p&gt;Still, be aware that emojis do not make up for harsh or toxic code review feedback.&lt;/p&gt;
&lt;h2&gt;7. Explain your reasons for the requested PR change&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;If you suggest a code change, then you should also explain the reasons why you suggest this change. This is unnecessary if you are 100% sure that the code author is aware of the reasons. Still, most of the time, adding a brief explanation to your pull request comment is better than assuming the code author knows your reasons. This differentiates plain criticism from constructive code review feedback.&lt;/p&gt;
&lt;p&gt;Example: Instead of only saying, “This code does not close the socket connection,” explain the consequence: “Leaving the socket open can leak system resources and keep the connection open longer than intended.”&lt;/p&gt;
&lt;h2&gt;8. Give guidance during code reviews&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;The code reviewer does not need to take over the code author’s job. Still, it is good practice not only to critique an aspect of the code but also to guide the code author toward an improvement.&lt;/p&gt;
&lt;p&gt;Sometimes this can be a quick note about a method or API that can be used. For example, in our socket comment, you could add: “Please use the &lt;code class=&quot;language-text&quot;&gt;close()&lt;/code&gt; method to close the connection.”&lt;/p&gt;
&lt;p&gt;Often, code authors need guidance when the feedback is less clear. For example, recall the example where we told the code author that we did not understand the code. Here, it’s crucial that we add some guidance on what the code author can improve to make the code review feedback constructive.&lt;/p&gt;
&lt;p&gt;This means adding guidance to “It’s hard for me to understand this code,” such as “I think more expressive variable names would help me understand it.”&lt;/p&gt;
&lt;p&gt;Similarly, code authors need guidance when reviewers critique architectural or design changes. For example, saying “This code should be more performant” isn’t constructive. As a code reviewer, you do not need to come up with a complete solution, but your feedback should briefly lay out your improvement strategy. Again, this differentiates unconstructive from constructive code review feedback.&lt;/p&gt;
&lt;h2&gt;9. Add value for the code author&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;Whenever you give code review feedback, it is important to be aware of the context. This will affect how much explanation or guidance you need to provide, and can also affect the tone.&lt;/p&gt;
&lt;p&gt;To understand how you can add the most value for the code author, consider whom you are giving feedback to. Is this a colleague you know well, a new hire, or someone from another team? How much guidance and explanation do they need for this code change?&lt;/p&gt;
&lt;p&gt;Also, think outside the box. For example, instead of marking every spelling mistake, you could point the code author to a spell-checker plugin or offer to help them install it in their IDE. That way, you can focus on giving respectful and constructive code review feedback instead of performing tasks that tools can do better, faster, and automatically.&lt;/p&gt;
&lt;h2&gt;10. Assume miscommunication over malice&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;Finally, always assume miscommunication over malice during code reviews.&lt;/p&gt;
&lt;p&gt;As we already discussed, in written communication, the receiver of the message must interpret the message with no natural clues, such as body language, facial expression or tone. Several studies show that this can easily go wrong. Misinterpretations happen frequently and are, in addition, hard to detect on the sender’s side. The best way to limit misunderstandings is to err on the side of caution.&lt;/p&gt;
&lt;p&gt;But whenever code review feedback feels harsh, or you feel attacked or belittled during a pull request, it is good to &lt;a href=&quot;https://www.michaelagreiler.com/accept-code-review-feedback/&quot;&gt;take a step back&lt;/a&gt;. Give yourself time to calm down before responding. Then remember that, most of the time, people have good intentions. With that mindset, you can address the feedback and help your peers convey their message more compassionately.&lt;/p&gt;
&lt;p&gt;What’s next? Read about &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;code review challenges that slow teams down&lt;/a&gt;, &lt;a href=&quot;/fundamentals/code-review-101/&quot;&gt;the fundamentals of effective code reviews&lt;/a&gt;, and &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;proven code review best practices&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally, join my &lt;a href=&quot;https://codereviews.substack.com/&quot;&gt;Awesome Code Reviews newsletter&lt;/a&gt; for research-based insights and practical guidance on code reviews and software engineering. If you want to follow my upcoming Code Review Book, you can also &lt;a href=&quot;https://www.michaelagreiler.com/code-review-book/&quot;&gt;join the early-reader group&lt;/a&gt;.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “How to Give Respectful and Constructive Code Review Feedback”: &lt;a href=&quot;https://www.michaelagreiler.com/respectful-constructive-code-review-feedback/&quot;&gt;https://www.michaelagreiler.com/respectful-constructive-code-review-feedback/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2026-07-24T09:59:30+02:00&quot;&gt;July 24, 2026&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Code Reviews at Google]]></title><description><![CDATA[Code reviews at Google play an important role as an engineering practice and have been adopted already in the early days of Google.
Still…]]></description><link>https://www.awesomecodereviews.com/code-reviews-at-google/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/code-reviews-at-google/</guid><pubDate>Mon, 29 Jul 2019 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Code reviews at Google play an important role as an engineering practice and have been adopted already in the early days of Google.
Still today, they are used to keep the code base clean and consistent, and to ensure no arbitrary code is committed.
Even though the code review process looks similar to &lt;a href=&quot;/code-reviews-at-microsoft/&quot;&gt;code reviews at Microsoft&lt;/a&gt;, there are some Google specifics that allow for a particular &lt;em&gt;lightweight code review process&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;So let me show you what code reviews at Google look like and what sets them apart from code reviews at Microsoft. In particular, I’ll show you what allows the 25,000 engineers at Google to review their code much faster than at other companies of this size. So, let’s get started.&lt;/p&gt;
&lt;h2&gt;Code Review Study at Google&lt;/h2&gt;
&lt;p&gt;Caitlin Sadowski, a researcher at Google, and others have performed a &lt;a href=&quot;https://sback.it/publications/icse2018seip.pdf&quot;&gt;study to understand Google’s internal code review processes.&lt;/a&gt; This study is similar to the &lt;a href=&quot;/code-reviews-at-microsoft/&quot;&gt;code review study at Microsoft&lt;/a&gt;, which makes it interesting to compare the code review processes at the two companies.&lt;/p&gt;
&lt;div class=&quot;row code-review-book-sign-up justify-content-md-center p-5 border&quot;&gt;
&lt;div class=&quot;col col-lg-6 col-sm-12&quot;&gt;
&lt;p&gt;
I prepared an exclusive &lt;a href=&quot;https://www.michaelagreiler.com/code-review-e-book/&quot;&gt;Code Review e-Book&lt;/a&gt; for my e-mail subscribers packed with all code review best practices, a code review checklist and other great insights and summaries about code reviews. Get the 20-page insights to code reviews now. &lt;a href=&quot;#newsletterId&quot;&gt;Get it now&lt;/a&gt;.
&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;col-lg-4  float-right&quot; style=&quot;max-width:450px;&quot;&gt;&lt;span class=&quot;gatsby-resp-image-wrapper&quot; style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 860px; &quot;&gt;
      &lt;span class=&quot;gatsby-resp-image-background-image&quot; style=&quot;padding-bottom: 65.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAIEAf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAGu5sGAT//EABoQAAEFAQAAAAAAAAAAAAAAABEAAQMQEhP/2gAIAQEAAQUCaaTW26IICv/EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABoQAAICAwAAAAAAAAAAAAAAABARABIhMUH/2gAIAQEABj8CWJXuyx//xAAcEAACAgIDAAAAAAAAAAAAAAABEQBRECExQWH/2gAIAQEAAT8hIDYzUPoggwlROh3BxP/aAAwDAQACAAMAAAAQkx//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/ED//xAAcEAEAAgMBAQEAAAAAAAAAAAABABEhMUFxUWH/2gAIAQEAAT8QxOg4L6m8Ygw2sUbJ4X5N9AXoS4AQKsZr5cVh/J//2Q==&apos;); background-size: cover; display: block;&quot;&gt;&lt;/span&gt;
  &lt;img class=&quot;gatsby-resp-image-image&quot; alt=&quot;E Book Preview&quot; title=&quot;E Book Preview&quot; src=&quot;/static/1c1c1319295d58749fdaeef267ef17d4/8d3e2/E-Book-Preview.jpg&quot; srcset=&quot;/static/1c1c1319295d58749fdaeef267ef17d4/f93b5/E-Book-Preview.jpg 300w,
/static/1c1c1319295d58749fdaeef267ef17d4/b4294/E-Book-Preview.jpg 600w,
/static/1c1c1319295d58749fdaeef267ef17d4/8d3e2/E-Book-Preview.jpg 860w&quot; sizes=&quot;(max-width: 860px) 100vw, 860px&quot; style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot;&gt;
    &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;A typical code review process at Google&lt;/h2&gt;
&lt;p&gt;A typical code review at Google looks very much like a &lt;a href=&quot;/code-reviews-at-microsoft/&quot;&gt;typical code review at Microsoft&lt;/a&gt;. Let’s look at an example, by imagining a Googler’s code review process. Let’s call him Mark.&lt;/p&gt;
&lt;h2&gt;Preparing code for review&lt;/h2&gt;
&lt;p&gt;It all starts after Mark has made some changes to the code and wants those code changes to be merged with the shared codebase. At Google, code reviews are, similar to Microsoft, done with the help of a tool. So before Mark sends his code changes out for review, he uses the tool to look through the code one last time.&lt;/p&gt;
&lt;p&gt;Critique, Google’s internal code review tool, offers some diffing capabilities that make it easy for Mark to spot errors and see what has changed in this new version of the code.&lt;/p&gt;
&lt;p&gt;Before sending the code out for review Mark needs to perform another step. Running the code through a static analysis tool. So, Mark runs, for example, &lt;a href=&quot;https://ai.google/research/pubs/pub43322&quot;&gt;Tricorder&lt;/a&gt;, a tool widely used at Google, and reviews the results of the static analysis tool. When he is happy with his changes, he sends the changes to at least one code reviewer.&lt;/p&gt;
&lt;h2&gt;Reviewers give feedback&lt;/h2&gt;
&lt;p&gt;The code reviewer carefully looks through the code and leaves comments if she sees a problem or needs some clarification. Mark then addresses each comment either by changing the code or replying to the comment. If Mark made some changes to the code under review, he uploads the new version for reviewers to check again. If a reviewer is satisfied, she can approve the change by marking it as “LGTM” (looks good to me). To be able to commit the code to the shared codebase, at least one reviewer must approve the code.&lt;/p&gt;
&lt;p&gt;Looking at this code review lifecycle from a distance it looks like a carbon copy of a code review at Microsoft. But, there are profound differences that I’ll show you now.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 800px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 113.66666666666667%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAXCAYAAAALHW+jAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEM0lEQVQ4y42V+48TVRTH+28Zor+pgMYEkV/82YiPxMcCBhCJBoPP+ABRAyYIiOyuLI8YTVCWl667UHZhH3Rpt51HZ9ppp+10ZtppZ3Y6/Zi5fbAbMeEm3/mee+fe75yee3pO4unRt3nqzFtsGtvRxwgbR0cEb+pzvGfz2A7Bw/d9bOxjoJOIja3n9rL/xg98NnOaL26OsmPyMIeS42Lt85mf+To5zr7rRxm5fIhdV75h99VvOTI7wZe3xjg4dYL3rh/juV/eEcKJx068zOOnXuX5ib1sO7dPIP7StvP7eHZ813B989hOMR/wixffH+7fcnY3G05uJ9ZKXFFmuarMckm6yR/SLf6UklxT55iUb3Olj8tyUuy5qswJjs/Ea2JdnRPzARL0x7Sd5oPsKKmmRqcb4YU+EV3anYDVbge/G+J1fGGHRLSjVWFbLYd2GAxkSLRCn2yzyKR5l4Mr41woTJPSsszll7lfkJhVU8zn0ySzC9zKLTAr3+OOnGJ65Q6LWoZFM4dUL7IahXSiiEQYdagGDr+Vk7y++D2XK3exCxV0TUPPayiSjKEXaTourYZH02ngWLZgr9Fk7eh2uyTiRzwWHYWJ4hSFdo2g5eN5Hn7bp9FoEPg+jzLWCbY6PopXphG28KOQVhT0YkaHVifADTy8sN3j1Tbt0Mf1PRy/KdCJOr0YxhcQj1k7ywltEqNlsWCsMG9kSOop7psK8/G8mGHJyHJbTwk7bSosVxVSVYX58or4kBCMH3N2jq+ki/xjLVMPGmiyKmJXKhjIOYm8olLQdMpGCdMoY5bKWNXaw39ybFQDl5v1NGZgi3QxTRNd1zErFarVKoVCAdd1HyqwFsLDqG80wjbpho4Teg8OgMhFwd0uq2FI2AlZ7SPOkBhRP2zCw4Hgaf0aL80fZsZKU2rUWDCzLFZyyHaRVFUWWKpKZCyNparMXXOFtJUnVZFJ1/L/veXD8q9sXzhCqpGnZlbJ6xpaQadoGJTKJfSCTk6S0HQNNa9SLBmUTVP4P7jhvoc9dy8YM7yxdJTbdpZ6uSaEFFkmn8+jqiqapiHlJBHPeB5zGIbr4iliODD8ziq1wCWI1myKujzqGAoOJsV2DdkrYQdNam0HJ2iKwmC26tT9xjq2fBer7VJuWlQ8eyg2TJv4X3LemOaoeomMq7OoZ1guS+Qtgzn9PrmKJpI5VZaYL2RYMVXuGTmWKwpZSxdFYZ1gM2zznfI7BzKjaF4FQ9XR4sKgKGhqXiR1LpMVxUKVFZHoIrH7IYkzZYBhPSz6FhmvILwVFcW2cW0Hp95j13GxrXrPtp3/jWVi/41joncc+Ot4D38f55OZn4b4aPqU4I/XrH06c5qDUyf5cOpHeucfIBH3kwE2nHyFJ8+8KfpE3EviXvHM+E5eOPcuW87uYevE3iG2TOwRvSU+98Sp14Ya/wIvtkypmCtIYAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Code Reviews at Google&quot;
        title=&quot;Code Reviews at Google&quot;
        src=&quot;/static/3432bf54634e91f8f01c28cb72ff581a/5a190/Code-Reviews-at-Google.png&quot;
        srcset=&quot;/static/3432bf54634e91f8f01c28cb72ff581a/5a46d/Code-Reviews-at-Google.png 300w,
/static/3432bf54634e91f8f01c28cb72ff581a/0a47e/Code-Reviews-at-Google.png 600w,
/static/3432bf54634e91f8f01c28cb72ff581a/5a190/Code-Reviews-at-Google.png 800w&quot;
        sizes=&quot;(max-width: 800px) 100vw, 800px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Company-wide policies for Approval&lt;/h2&gt;
&lt;p&gt;First of all, Google requires each code change to be reviewed. No exceptions. Period.&lt;/p&gt;
&lt;p&gt;At Microsoft, on the other hand, code reviews, including how and what needs to be reviewed are at the discretion of the divisions or teams. Some teams skip, for example, code reviews for small and &lt;a href=&quot;/code-reviews-at-microsoft/&quot;&gt;trivial changes&lt;/a&gt;. In general, there aren’t any company-wide policies around code reviews. Teams and divisions decide on how many code reviewers are needed, and how code reviews are linked with testing and static analysis activities and more.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class=&quot;bctt-click-to-tweet&quot;&gt;At Google, each code change is reviewed. Period. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;text=At%20Google%2C%20each%20code%20change%20is%20reviewed.%20Period &amp;via=mgreiler&amp;related=mgreiler&quot;&gt;Click to tweet&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Code reviews at Google address ownership and readability&lt;/h2&gt;
&lt;p&gt;Also contrary to Microsoft, Google has some &lt;em&gt;company-wide requirements&lt;/em&gt; that must be fulfilled by the code reviewers in order to be able to approve the code change. One has to do with Google’s strong code ownership. Each directory of the codebase is explicitly owned by a set of people. To be able to get the code change approved, at least one reviewer must be an owner of the code under review. That person acts as a gatekeeper. Only if this person gives his or her okay, code can be checked in.&lt;/p&gt;
&lt;p&gt;Another strict requirement is that at least one person on the review must be trained in code “readability”. What this means is that this person must have obtained a readability certification. This certification shows they’ve demonstrated they know how readable and maintainable code looks.&lt;br&gt;
The readability certification must be obtained per language. Having such criteria is a great practice to ensure consistency in style and design.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class=&quot;bctt-click-to-tweet&quot;&gt;To get decision power, reviewers at Google must obtain a readability certificate that shows they understand what readable code looks like. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;text=To%20get%20decision%20power%2C%20reviewers%20at%20Google%20must%20obtain%20a%20readability%20certificate%20that%20shows%20they%20understand%20what%20readable%20code%20looks%20like.&amp;via=mgreiler&amp;related=mgreiler&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Click to Tweet.&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Requirements for reviewers aren’t focused on seniority or status&lt;/h2&gt;
&lt;p&gt;So, while many other companies, including several divisions at Microsoft, rather look at the seniority of the reviewer, the area of expertise or the hierarchy to grant decision power, Google looks at ownership and readability certification.&lt;/p&gt;
&lt;p&gt;This addresses some &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;common code review pitfalls&lt;/a&gt;. Requiring senior developers to approve code can easily lead to work overload and in turn, create bottlenecks.&lt;/p&gt;
&lt;p&gt;On the other hand, it is also important that enough people have such a readability certificate. &lt;a href=&quot;https://dev.to/pullrequest/getting-the-certification-to-review-code-at-google-55ng&quot;&gt;Otherwise, it also creates bottlenecks for reviews&lt;/a&gt;. And we all know, waiting on code review feedback is one of the &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;main pitfalls during code reviews&lt;/a&gt;. But while it takes quite some effort to obtain readability certification, it is easier than changing hierarchy or seniority.&lt;/p&gt;
&lt;h2&gt;How to get a readability certification&lt;/h2&gt;
&lt;p&gt;To demonstrate their ability to review code for readability, developers at Google go through a “&lt;a href=&quot;https://dev.to/pullrequest/getting-the-certification-to-review-code-at-google-55ng&quot;&gt;review of their code review practices&lt;/a&gt;”. Therefore, the developer submits code changes to a team of readability experts. Those will inspect the code. But this inspection is not like a normal code review. No, readability experts look at the code with much more scrutiny. The purpose of such reviews is to point out every little mistake and every potential for improvement, especially in terms of coding conventions and coding style. Also, nitpicking issues such as indentation or extra spaces are part of this learning process. For the interested, you can find &lt;a href=&quot;https://github.com/google/styleguide&quot;&gt;Google style guides for various languages here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Once the experts are convinced that the developer learned and is able to apply Google’s coding style and conventions, they issue the readability certification.&lt;/p&gt;
&lt;h2&gt;What it takes to get code approved&lt;/h2&gt;
&lt;p&gt;So to recap, to get your code approved at Google, you need at &lt;em&gt;least one person&lt;/em&gt; on the code review that has &lt;em&gt;ownership&lt;/em&gt; over the code and the right &lt;em&gt;readability certification&lt;/em&gt; for the used language. If those two criteria are met, you are good to go.&lt;/p&gt;
&lt;p&gt;No rule without exceptions. Also at Google teams exist where more than one developer must approve or where different criteria for reviewers are enforced. But, the general rule is one developer’s approval is enough.&lt;/p&gt;
&lt;h2&gt;Code reviews at Google are light-weight and fast&lt;/h2&gt;
&lt;p&gt;Google explicitly wants its code review practices to be lightweight and fast. And even though Google enforces the ownership and readability criteria for approval, the code review process is – with 4 hours on average – really fast. Small changes are reviewed within 1 hour, and larger ones within 5 hours. Other companies report average turnaround times of over 15 hours.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class=&quot;bctt-click-to-tweet&quot;&gt;At Google, code review are on average completed within 4 hours. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;text=At%20Google%2C%20code%20review%20are%20on%20average%20completed%20within%204%20hours.&amp;via=mgreiler&amp;related=mgreiler&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Click to Tweet.&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So, how does Google do code reviews so fast?&lt;/p&gt;
&lt;p&gt;Well, looking at the &lt;a href=&quot;https://sback.it/publications/icse2018seip.pdf&quot;&gt;data reported&lt;/a&gt;, we can see that there are two important factors: the number of review participants and change size.&lt;/p&gt;
&lt;h2&gt;Requiring only one reviewer speeds up code review times&lt;/h2&gt;
&lt;p&gt;One of the most interesting findings from the study is that more than 75% of the code reviews have just one reviewer. That’s unusual. Especially because studies have shown that two reviewers tend to give more valuable feedback.&lt;/p&gt;
&lt;p&gt;Requiring only one reviewer seems like a conscious decision at Goggle and &lt;em&gt;trades review rigor for speed&lt;/em&gt;. Only that way, Google can realize fast turn-around times. Skipping the need to wait for another person reduces a lot of complexity. But it hurts review rigor, as also the study mentions. How much this costs in terms of quality is unknown. Still, Google seems to have great outcomes with this set-up.&lt;/p&gt;
&lt;h2&gt;Small change sizes are essential for fast and high-quality code reviews&lt;/h2&gt;
&lt;p&gt;Another crucial insight from this study is the size of the change. Can you imagine, 90% of the code reviews have fewer than 10 files changed? That’s truly impressive and also explains why code reviews at Google are lightning-fast. Most of the changes also have only around 24 lines of code changed. That’s a much smaller change size than reported by studies of other companies, including Microsoft.&lt;/p&gt;
&lt;p&gt;Reviewing small, coherent changes is a &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;proven code review best practice&lt;/a&gt;. First, it increases the review speed. But, as we have seen in our study on &lt;a href=&quot;https://www.michaelagreiler.com/great-code-review-feedback/&quot;&gt;valuable code review feedback&lt;/a&gt;, it also improves the value of the code review feedback. The usefulness of the code review feedback decreases as the size of the code reviews increase. Googlers know that and submit frequently and small code changes. How smart!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class=&quot;bctt-click-to-tweet&quot;&gt;Code Reviews at Google are fast for two main reasons. First, 90% of code reviews at Google comprise less than 10 files. Second, 75% of the reviews have only one reviewer &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;text=Code%20Reviews%20at%20Google%20are%20fast%20for%20two%20main%20reasons.%20First%2C%2090%25%20of%20code%20reviews%20at%20Google%20comprise%20less%20than%2010%20files.%20Second%2C%2075%25%20of%20the%20reviews%20have%20only%20one%20reviewer&amp;via=mgreiler&amp;related=mgreiler&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Click to Tweet.&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Are code reviews worth the effort?&lt;/h2&gt;
&lt;p&gt;While analyzing code review practices and tools at Microsoft, I often thought about what it actually means to provide value during code reviews. When are code reviews worth the time a team spends on them?&lt;/p&gt;
&lt;p&gt;To answer that question, I turned to the developers and ask them why they are doing code reviews and when they get value out of them.&lt;/p&gt;
&lt;p&gt;Well, &lt;a href=&quot;https://www.michaelagreiler.com/great-code-review-feedback/&quot;&gt;turns out code reviews must lead to changes to provide value&lt;/a&gt;. Even though it is okay if some code reviews don’t lead to any changes, it is important that a majority of them actually have an impact on the code. Otherwise, we could just skip them, right?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class=&quot;bctt-click-to-tweet&quot;&gt;Code reviews must lead to change to unfold their true value. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;text=Code%20reviews%20must%20lead%20to%20change%20to%20unfold%20their%20true%20value.&amp;via=mgreiler&amp;related=mgreiler&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Click to Tweet.&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So, coming back to the Google study, I found it interesting that the researchers also had the premise that if there is no action taken, the code review could have been skipped. The good news is 80% of the code reviews at Google do require the developer to take action. This clearly shows that code reviews have an active impact on the codebase. But what about the 20%? Is that time wasted?&lt;/p&gt;
&lt;p&gt;Well, things are not that simple. Fortunately, code reviews provide a broad set of benefits.&lt;/p&gt;
&lt;h2&gt;Motivations and benefits for code reviews at Google&lt;/h2&gt;
&lt;p&gt;Even though code reviews are often associated with finding bugs,
several studies on code reviews show that the &lt;a href=&quot;/code-reviews-at-microsoft/&quot;&gt;benefits and motivations for doing code&lt;/a&gt; reviews go far beyond that.
Also, Googlers are aware that the benefits of code reviews are manifold, especially if &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practices&lt;/a&gt; are followed.
The original vision of the employee that introduced code reviews at Google was &lt;em&gt;to force developers to write code that other developers understand&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;In the study, Googlers report the following motivations for code reviews:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Education (mentoring, learning for developers, knowledge dissemination)&lt;/li&gt;
&lt;li&gt;Maintaining norms (such as having adequate tests, consistent style and design)&lt;/li&gt;
&lt;li&gt;Gatekeeping (ensuring security, and having an additional safety net so that a single developer can not commit arbitrary code) and&lt;/li&gt;
&lt;li&gt;Accident prevention (this includes making sure bugs and defects are prevented as good as possible, and that the source code is of high quality).&lt;/li&gt;
&lt;li&gt;Tracing and tracking decisions (understanding the evolution of the code and why and how changes have happened)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 800px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 113.66666666666667%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAXCAYAAAALHW+jAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAFC0lEQVQ4y1VV6XNTVRR/f5B/gQ7ijDPqjI4jICqKI18cthlcoIW2CFQcFVRAaCmlTZckTdtsLy9r+5K8vuS97FuTNlvTbG3aptAFxO8/554u6offnHPPPfd3l7Nc7t2p78DwzuS3+NDUiY/M13DSeh3HLV04Zu4i/YS1m+aYftLaQz7HLd34hL+OD4wdtPaAhztQ3jZcwjnPXdxSNBhM2/BzWItfwloMpHn8GtGhw9+HoYyAP2KTuK2Ooi9pweOUFZfE+7T2kPC9qe/BwAbHLF342NqDz4Wb+D1qwN3IBBHciehxxd9HtvvxaRqfcf6Ez2w3cMLSTWsPeLij+os4qr8AJo/oLuCI7jxe155F19wArkqP0SH14Yr/Eb52/4pOqR+9ioZOy/ze0J4j+Zb+IoFxcGznnsAgeuTBQ5JrcwPo8PeTzuYv+x+RvDrHNug/1LvkJ+iWB/f8pX6S3PJOC+JyDHIjDaWVhbKWg7qWQ2htgSA1UihtNZF/XoNcT5OfVEv+H/UU/PUkWn89A5dv1xBZTEMsR6GLO6GLOKGPOqEN2aGPODGVE5HfqkPIyThjuAlTzocBjwH9rgn0OXR4YB2Fad4LvhxAfXcdXPF5A6MyD2dJhSHqIn0sYINOtUOnOjCd8xKhWIrghvgE2qCAp7PTGJN5khqfmXztFRWN3Q1wxa0G+KUgTBkvwZLzw5qTSBfyAQgVBdl2BZnNJTjLKgwRF6YSM5hOzpI0RN0wpb0QykE0X7TBFbYamEh7oJHMGJydIgz7zXjqNWLIa8RUVsR8u4LERhHjUQc0kgXDkhlDPiOGfCY89RkxIlthyMyg8bINrvmyjUhrEWpjHtJyAnI1RZhbTpJkj17ZWaXA+Gt7NrWZ3cc81JUsrQ3U02j/vQ1uYb2CTvM96BMuSM0UPJUIxFoM3kYCYi0OZyVEEZ7fWEJgKYlQMwtLygdzwgtzQoQl6YVjMYCZahSrLzfBBYoJvNZ7DJd1dzAimil6D/lxDLgNGHBN4E/7OFKtIhKtAtyZIN1iUJzGA/MIHvJjuGcchi7kAF8O/htlTdQGoRSEY0kl2EsKhGIAjrICY85Hp0uuF2EpzMFVi4BflDGxHxx92AlzxgdHNYTGiw1w5e0VGDNe6FUH9CHHYcpMxjzQKXYYkh4sPK8i3ipgJGDFeMBGYISMTKvYMRF2YjRoQ22rtZc2xgUfGXUhOxHqww5Kaq0iUJQXnjHCPMZCAhFoVfvhPPMdD9owqvBosCuzcgmv5hDbLCO6WUZ8LY/YWh6JdgmpZ2XE20UUd5rIb9cR2yiQLcl8W3t+sfUC4usFhFsL2Hi1Ba62swa+HoHHpYPPooGjEYOnGqHrsCcYDwoYmbPS6acTM3TCyZgbnnoU7moErkoIrkoYtnIQ7Pm46m4LfEmBrIpwz5hhKypUBUOiEUOzRgx7TRjxW6jkDsqNSWNKhDHtpQC6lsPgSwEsMcLKbotyab5aRqCQBr8gYSLupooZUwWMBnkKxphiowphGAnwlDr6qItOJpQVmAoSSlsNcBuvtqGsZCnTg80MQq0cZb9U+U/VVJM0ZtUjLcVJMhtVyWpur9JWsnvti/0jZz138I33ATVI1lS75Se4Kj9G51w/rskD1EgZmH4wZk2ZdXDmf37mN+JgXBxr3W/qLuD96Sv40v4jTtlu4rS9F6f2/4svhFsE9n+cFnoJzO8rx22yfcr/QJ/U0f1v4B/fCYpbm7/5CAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Motivations change per role&quot;
        title=&quot;Motivations change per role&quot;
        src=&quot;/static/807198e10787b4ade5ff9c4801babeeb/5a190/Reasons-for-code-reviews-1.png&quot;
        srcset=&quot;/static/807198e10787b4ade5ff9c4801babeeb/5a46d/Reasons-for-code-reviews-1.png 300w,
/static/807198e10787b4ade5ff9c4801babeeb/0a47e/Reasons-for-code-reviews-1.png 600w,
/static/807198e10787b4ade5ff9c4801babeeb/5a190/Reasons-for-code-reviews-1.png 800w&quot;
        sizes=&quot;(max-width: 800px) 100vw, 800px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Reasons for code reviews at Google&lt;/h2&gt;
&lt;p&gt;Another interesting finding from the code review study at Google was that the motivations and expectations for doing code reviews depend on the person’s role and responsibilities. A manager, for example, is more interested in the benefit of creating a coherent coding style at the codebase than a single developer. On the other hand, developers are more concerned with finding defects or bugs.&lt;/p&gt;
&lt;p&gt;The reasons for code reviews reported by Googlers are aligned with the reasons reported by Microsoft engineers, except that Microsofties do not describe code reviews as a way of “gatekeeping”. Security checks, for example, aren’t part of the normal code review process at Microsoft.&lt;/p&gt;
&lt;h2&gt;Google’s code review tooling&lt;/h2&gt;
&lt;p&gt;At Google, code reviews are done with the help of tooling. Two main code review systems are predominant at Google. For open-source code and code shared with collaborators outside, like Go, Chromium, Android Googlers use the &lt;a href=&quot;https://www.gerritcodereview.com/&quot;&gt;Gerrit code review tool&lt;/a&gt;. Gerrit is an open-source code review tool that integrates with Git.&lt;/p&gt;
&lt;p&gt;For the internal code, on the other hand, Googlers use an internal code review tool called Critique. Critique is a rewrite of Mondrian. There aren’t any detailed description of the functionality of Critique, but &lt;a href=&quot;https://news.ycombinator.com/item?id=19102930&quot;&gt;Googlers seem to be pretty happy with the workflow&lt;/a&gt; and functionality.&lt;/p&gt;
&lt;p&gt;A lot of code reviews at Microsoft are also performed via tooling. But at Microsoft, other forms of code reviews, such as over the shoulder reviews, have their fair and justified warrant. Sometimes, nothing can beat a face-to-face conversation.&lt;/p&gt;
&lt;h2&gt;Google’s uniformed process is optimized for speed&lt;/h2&gt;
&lt;p&gt;To sum it up, Google has clear guidelines on what it takes to get a code review approved. What stands between you and the commit to the shared codebase is a review approval from at least one person with code &lt;em&gt;ownership and readability certification&lt;/em&gt;. That most reviews only have one reviewer takes also a lot of complexity out of the code review process. Company-wide code styles, make it crystal clear how readable code must look like. This combined with the small code change sizes allows Googlers to expect code review feedback in 1-5 hours.&lt;/p&gt;
&lt;p&gt;Similar to Microsofties, Googlers are very satisfied with the code review process and find it a valuable engineering practices.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you and your team want to boost your code review practices, &lt;a href=&quot;/workshops/&quot;&gt;book a code review workshop&lt;/a&gt; with me.&lt;/strong&gt; I have already worked with many product teams around the world.&lt;/p&gt;
&lt;br/&gt;
&lt;div class=&quot;row code-review-book-sign-up justify-content-md-center p-5 border&quot;&gt;
&lt;div class=&quot;col col-lg-6 col-sm-12&quot;&gt;
&lt;p&gt;
I prepared an exclusive &lt;a href=&quot;https://www.michaelagreiler.com/code-review-e-book/&quot;&gt;Code Review e-Book&lt;/a&gt; for my e-mail subscribers packed with all code review best practices, a code review checklist and  other great insights and summaries about code reviews. Get the 20-page insights to code reviews now. &lt;a href=&quot;#newsletterId&quot;&gt;Get it now&lt;/a&gt;.
&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;col-lg-4  float-right&quot; style=&quot;max-width:450px;&quot;&gt;&lt;span class=&quot;gatsby-resp-image-wrapper&quot; style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 860px; &quot;&gt;
      &lt;span class=&quot;gatsby-resp-image-background-image&quot; style=&quot;padding-bottom: 65.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAIEAf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAGu5sGAT//EABoQAAEFAQAAAAAAAAAAAAAAABEAAQMQEhP/2gAIAQEAAQUCaaTW26IICv/EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABoQAAICAwAAAAAAAAAAAAAAABARABIhMUH/2gAIAQEABj8CWJXuyx//xAAcEAACAgIDAAAAAAAAAAAAAAABEQBRECExQWH/2gAIAQEAAT8hIDYzUPoggwlROh3BxP/aAAwDAQACAAMAAAAQkx//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/ED//xAAcEAEAAgMBAQEAAAAAAAAAAAABABEhMUFxUWH/2gAIAQEAAT8QxOg4L6m8Ygw2sUbJ4X5N9AXoS4AQKsZr5cVh/J//2Q==&apos;); background-size: cover; display: block;&quot;&gt;&lt;/span&gt;
  &lt;img class=&quot;gatsby-resp-image-image&quot; alt=&quot;E Book Preview&quot; title=&quot;E Book Preview&quot; src=&quot;/static/1c1c1319295d58749fdaeef267ef17d4/8d3e2/E-Book-Preview.jpg&quot; srcset=&quot;/static/1c1c1319295d58749fdaeef267ef17d4/f93b5/E-Book-Preview.jpg 300w,
/static/1c1c1319295d58749fdaeef267ef17d4/b4294/E-Book-Preview.jpg 600w,
/static/1c1c1319295d58749fdaeef267ef17d4/8d3e2/E-Book-Preview.jpg 860w&quot; sizes=&quot;(max-width: 860px) 100vw, 860px&quot; style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot;&gt;
    &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br/&gt;
&lt;h4&gt;Credit where credit is due&lt;/h4&gt;
&lt;p&gt;This blog post is based on the wonderful study of &lt;a href=&quot;https://sback.it/publications/icse2018seip.pdf&quot;&gt;code reviews at Google &lt;/a&gt;done by Caitlin Sadowski, Emma Söderberg, Luke Church, Michal Sipko from Google and Alberto Bacchelli from the University of Zurich. I also want to thank &lt;a href=&quot;https://www.robertgoeritzer.com/&quot;&gt;Robert Göritzer&lt;/a&gt; and &lt;a href=&quot;https://leif.me/about/&quot;&gt;Leif Singer&lt;/a&gt; for taking the time to read my drafts and to provide feedback.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Code Reviews at Google”: &lt;a href=&quot;https://www.michaelagreiler.com/code-reviews-at-google/&quot;&gt;https://www.michaelagreiler.com/code-reviews-at-google/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-01-17T09:59:30+01:00&quot;&gt;January 17, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Code Review Best Practices]]></title><description><![CDATA[To learn more about code review best practices read the following articles: 1. Code Review Best Practices 2. Pull Request Templates…]]></description><link>https://www.awesomecodereviews.com/best-practices/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/best-practices/</guid><pubDate>Mon, 29 Jul 2019 08:59:30 GMT</pubDate><content:encoded>&lt;h3&gt;To learn more about code review best practices read the following articles:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;&lt;strong&gt;1. Code Review Best Practices&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/pull-request-template/&quot;&gt;&lt;strong&gt;2. Pull Request Templates&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;&lt;strong&gt;3. Checklist-based Code Reviews&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/checklists/secure-code-review-checklist/&quot;&gt;&lt;strong&gt;4. Security-focused Checklist&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/best-practices/stacked-pull-requests/&quot;&gt;&lt;strong&gt;5. Stacked Pull Requests&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/workshop-approval/&quot;&gt;&lt;strong&gt;6. Training Approval Request&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Code Review Best Practices”: &lt;a href=&quot;https://www.awesomecodereviews.com/best-practices/&quot;&gt;https://www.awesomecodereviews.com/best-practices/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2022-01-22T09:59:30+01:00&quot;&gt;January 22, 2022&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Code Review Fundamentals]]></title><description><![CDATA[If you want to learn the fundamentals of code reviews, have a look at the following articles: 1. Code Review 101 2. 10 Best Review…]]></description><link>https://www.awesomecodereviews.com/fundamentals/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/fundamentals/</guid><pubDate>Mon, 29 Jul 2019 08:59:30 GMT</pubDate><content:encoded>&lt;p&gt;If you want to learn the fundamentals of code reviews, have a look at the following articles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/fundamentals/code-review-101/&quot;&gt;&lt;strong&gt;1. Code Review 101&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/code-reading/code-review-techniques/&quot;&gt;&lt;strong&gt;2. 10 Best Review Techniques&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/fundamentals/challenges/&quot;&gt;&lt;strong&gt;3. Code Review Challenges&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;&lt;strong&gt;4. Code Review Best Practices&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/respectful-constructive-code-review-feedback/&quot;&gt;&lt;strong&gt;5. Code Review Feedback&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/tools/best-code-review-tools/&quot;&gt;&lt;strong&gt;6. 10 Best Code Review Tools&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Code Review Fundamentals”: &lt;a href=&quot;https://www.awesomecodereviews.com/fundamentals/&quot;&gt;https://www.awesomecodereviews.com/fundamentals/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2025-06-10T09:59:30+01:00&quot;&gt;June 10, 2025&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Code Reviews at Microsoft]]></title><description><![CDATA[How does Microsoft do code reviews? Have you ever wondered how one of the largest software companies worldwide ensures high-quality code…]]></description><link>https://www.awesomecodereviews.com/code-reviews-at-microsoft/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/code-reviews-at-microsoft/</guid><pubDate>Wed, 27 Mar 2019 08:00:57 GMT</pubDate><content:encoded>&lt;p&gt;How does Microsoft do code reviews? Have you ever wondered how one of the largest software companies worldwide ensures high-quality code through code reviewing?&lt;/p&gt;
&lt;p&gt;So did I. That’s why together with my colleagues, we investigated how code reviews are done at Microsoft. Is it a common practice? Are developers required to do code reviews? And which tools do they use?&lt;/p&gt;
&lt;p&gt;Let’s find out in this post, which is part of a &lt;a href=&quot;/code-review-blog-post-series/&quot;&gt;larger blog post series about code reviews&lt;/a&gt; showing you &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practices&lt;/a&gt;, &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;code review challenges&lt;/a&gt;, how &lt;a href=&quot;/code-reviews-at-google/&quot;&gt;code reviews work at Google&lt;/a&gt;, and much more.&lt;/p&gt;
&lt;p&gt;To begin with, let me give you some key information about Microsoft. &lt;a href=&quot;https://news.microsoft.com/facts-about-microsoft/#EmploymentInfo&quot;&gt;Microsoft has around 140.000 employees&lt;/a&gt;. Approximately 44% of them, which means over 60,000 employees, are engineers. Several products such as Office, Visual Studio or Windows are developed by thousands of engineers that work on the same codebase simultaneously.&lt;/p&gt;
&lt;p&gt;I say all this to give you some context and perspective on what it means to coordinate and manage the software development process. As you can imagine, it is a non-trivial task to ensure code developed by different sub-teams actually works perfectly together. And code reviews play a big role at Microsoft to allow smooth collaboration at such a large scale.&lt;/p&gt;
&lt;h2&gt;Code reviews at Microsoft are an integral part of the development process&lt;/h2&gt;
&lt;p&gt;One of the important facts when it comes to code reviews at Microsoft is that it is a highly adopted engineering practice. Thousands of engineers perceive it as a great best practice. And most high-performing teams spend a lot of time doing code reviews.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class=&quot;bctt-click-to-tweet&quot;&gt;At Microsoft, code reviewing is a highly adopted engineering practice and perceived as a great best practice. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;text=At%20Microsoft%2C%20code%20reviewing%20is%20a%20highly%20adopted%20engineering%20practice%20and%20perceived%20as%20a%20great%20best%20practice.%20%20&amp;via=mgreiler&amp;related=mgreiler&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Click to Tweet.&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class=&quot;row code-review-book-sign-up justify-content-md-center p-5 border&quot;&gt;
&lt;div class=&quot;col col-lg-6 col-sm-12&quot;&gt;
&lt;p&gt;
I prepared an exclusive &lt;a href=&quot;https://www.michaelagreiler.com/code-review-e-book/&quot;&gt;Code Review e-Book&lt;/a&gt; for my e-mail subscribers packed with all code review best practices, a code review checklist and other great insights and summaries about code reviews. Get the 20-page insights to code reviews now. &lt;a href=&quot;#newsletterId&quot;&gt;Get it now&lt;/a&gt;.
&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;col-lg-4  float-right&quot; style=&quot;max-width:450px;&quot;&gt;&lt;span class=&quot;gatsby-resp-image-wrapper&quot; style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 860px; &quot;&gt;
      &lt;span class=&quot;gatsby-resp-image-background-image&quot; style=&quot;padding-bottom: 65.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAIEAf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAGu5sGAT//EABoQAAEFAQAAAAAAAAAAAAAAABEAAQMQEhP/2gAIAQEAAQUCaaTW26IICv/EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABoQAAICAwAAAAAAAAAAAAAAABARABIhMUH/2gAIAQEABj8CWJXuyx//xAAcEAACAgIDAAAAAAAAAAAAAAABEQBRECExQWH/2gAIAQEAAT8hIDYzUPoggwlROh3BxP/aAAwDAQACAAMAAAAQkx//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/ED//xAAcEAEAAgMBAQEAAAAAAAAAAAABABEhMUFxUWH/2gAIAQEAAT8QxOg4L6m8Ygw2sUbJ4X5N9AXoS4AQKsZr5cVh/J//2Q==&apos;); background-size: cover; display: block;&quot;&gt;&lt;/span&gt;
  &lt;img class=&quot;gatsby-resp-image-image&quot; alt=&quot;E Book Preview&quot; title=&quot;E Book Preview&quot; src=&quot;/static/1c1c1319295d58749fdaeef267ef17d4/8d3e2/E-Book-Preview.jpg&quot; srcset=&quot;/static/1c1c1319295d58749fdaeef267ef17d4/f93b5/E-Book-Preview.jpg 300w,
/static/1c1c1319295d58749fdaeef267ef17d4/b4294/E-Book-Preview.jpg 600w,
/static/1c1c1319295d58749fdaeef267ef17d4/8d3e2/E-Book-Preview.jpg 860w&quot; sizes=&quot;(max-width: 860px) 100vw, 860px&quot; style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot;&gt;
    &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;Investigating code reviews at Microsoft&lt;/h2&gt;
&lt;p&gt;Because code reviews play such an important role in the Microsoft development process, it was an ideal target for us to dig deeper and understand the benefits and drawbacks of this practice. &lt;a href=&quot;../downloads/research/code-reviewing-in-the-trenches.pdf&quot;&gt;In a large-scale study on code reviews at Microsoft,&lt;/a&gt; we interviewed, observed and surveyed more than 900 developers about their code review practices.&lt;/p&gt;
&lt;p&gt;We aimed to understand how exactly code reviews are done at Microsoft. We wanted to know, which &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;code review pitfalls&lt;/a&gt; developers face while doing code reviews, and which &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practices&lt;/a&gt; they develop to overcome those challenges.&lt;/p&gt;
&lt;h2&gt;What can you learn from code review practices at Microsoft?&lt;/h2&gt;
&lt;p&gt;Most of the lessons learned are as valuable to smaller teams and organizations as they are for large teams and large organizations. In case your team does not do code reviews yet, I distilled our findings in a way that shows you the benefits of the practice. I also explain what the code review life cycle looks like so you can incorporate that practice into your development process.&lt;/p&gt;
&lt;p&gt;If your team already does code reviews, you can compare your practice with the code review practice at Microsoft. Does your code review lifecycle look different? In the next posts, you learn from &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;code review pitfalls&lt;/a&gt; and the &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practices&lt;/a&gt;. With this information, you can set out to see if your team already implements all the best practices I present and overcome challenges. But, let’s get started:&lt;/p&gt;
&lt;h2&gt;How often do Microsoft engineers perform code reviews?&lt;/h2&gt;
&lt;p&gt;In this study, 36% of the developers said they perform code reviews multiple times a day. Another 39% of the developers said they do code reviews at least once per day. 12% do code reviews multiple times a week, and only 13% said they did not do a code review in the past week.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 793px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 62.66666666666667%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAABJ0AAASdAHeZh94AAACH0lEQVQ4y3WTTWsTURSGB9wIrlwLRaj+gv6FulD8D1pBpLhxoQvBlb9ABBcu7MaVIAguRCUBaakLXURsTZOZTKbNR5vMJGkmzsy98/nI3DRNUtMXDucO54Nz3vOOlmUZOXLvui62bdPpdDg8OmLoupxFOpM/qZ2FNgmkaUoURYxGI5qtFmEogISDtsd2Y8CfOIBs2jRbYKoh58DzYp5v7LB6v8DK6y1WnF3udU30SIwnXFCTN9XyFdvtNq1WC8dxGPT7xMCN93WW1gvcWi/y4OMOq70Kywclbh7uYacxoecrWrrdrqobDofjCaWUeJ6nGv4NArXmO8NFe1lm6U2FXWuc2Ikj1myTqwclXrmdfG9Gvkez2cT3fcIw/H/l9MQ//mGjvfjNk5+2+hbpOPLFH3K98YuHjrWQJrXyLKlxOmbmqdlH+1RhvWrPXfaD32e5UeJRb3/u0nNHmZ4+Iz55f+77aEWDi5t1No5G+ElKcRBwu61zrVni7chRecmZZmrCyeMs7lYctK86WsHg0mYdrVBD2y5zp2sispTz6uZWFkIQCEESRfhC8Kxmc+X7Phe+mVzesljbs3GieKEW5zicoNfr0Wg0qNctjgcDCCUSqMuE42Sad54GT6+cJImaLve5BPK/JYwiAimJpCSTklgKNbWQUkkkz5/1cxwGQYBlWcqq1arSlmEYymqmiW4YVHWdcrlMrVZTcV3XT30u7knDf72fxkL+EKfJAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Shows survey results of how often Microsoft developer review code&quot;
        title=&quot;Shows survey results of how often Microsoft developer review code&quot;
        src=&quot;/static/0457f083a08fa35d77b6e0abadac75a3/73fd0/How-often-do-Microsoft-developers-review-code_-1.png&quot;
        srcset=&quot;/static/0457f083a08fa35d77b6e0abadac75a3/5a46d/How-often-do-Microsoft-developers-review-code_-1.png 300w,
/static/0457f083a08fa35d77b6e0abadac75a3/0a47e/How-often-do-Microsoft-developers-review-code_-1.png 600w,
/static/0457f083a08fa35d77b6e0abadac75a3/73fd0/How-often-do-Microsoft-developers-review-code_-1.png 793w&quot;
        sizes=&quot;(max-width: 793px) 100vw, 793px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;How often do Microsoft developers review code?&lt;/h2&gt;
&lt;p&gt;This means that developers at Microsoft spend a significant amount of their time on code reviews. So it is important to make sure that this time is spent worthwhile. But, which benefits does code reviewing provide?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class=&quot;bctt-click-to-tweet&quot;&gt;Developers at Microsoft spend a significant amount of their time on code reviews. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;text=Developers%20at%20Microsoft%20spend%20a%20significant%20amount%20of%20their%20time%20on%20code%20reviews.%20%20&amp;via=mgreiler&amp;related=mgreiler&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Click to Tweet.&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Which benefits does code reviewing provide?&lt;/h2&gt;
&lt;p&gt;The most important reasons developers mentioned as benefits of code reviews are to improve the code quality and to find defects in the code. Another important benefit of code reviews is knowledge transfer.&lt;/p&gt;
&lt;p&gt;Knowledge transfer means that team members that review each other’s code, become familiar with a larger part of the code base.
But, it also means that &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;code review best practices&lt;/a&gt; are developed within the team. Another advantage is that new team members and junior developers can learn and improve their coding skills while reviewing or getting feedback.&lt;/p&gt;
&lt;p&gt;If developers discuss alternative solutions during code reviews, it not only improves the code base but has also a learning effect for all involved. Learning, mentoring and self-improvement are therefore all reasons code reviewing is perceived as such a beneficial practice at Microsoft.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 793px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 53%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABe0lEQVQoz4WTR4syURRE/f9/Q1TMWXTjQoy4EdyZcxYEwYChhnOZ1zh8YR4U/ejud6yq2/re77dY9/tdy+VS2+1Wm81Gu91Oq9VKzWZTtVpN9Xr9hxqNhonnlUpFs9nMOD59r9frpcvlotPpZCDg0+lU8XhckUhE0WjUu4bDYQUCAQWDQZPf77d3Dfh8PnW73cwh+/P5rPV67QHT6bQSiYQpmUwasFgsqt1uq9VqmdhjxoDX69UOTiYTjcdj9Xo9uy4WCw2HQxUKBWUyGWWzWVM+n1e/39ffFikt8uPxsM7obr/f63A4WJdAXeRYLKZQKKTRaGSHSYOYgZMBAXGQiPP53ASY2BSdy+XMIeBOp2OwT4BbHpD+EM6ITUxcUAPxHZBBdLtdL9o/ge4G08XZ8Xj0Phucp1IpcweUe786ZDoMhsPE5ZNhj3DMlOmuWq167j4BfwDpigEAQg5Kp4PBQKVSyeQm+yvwc+zE5QcAEhtguVyW+ze57v4H/AIybiV+ybde3AAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;graphic showing the benefits of code reviews&quot;
        title=&quot;graphic showing the benefits of code reviews&quot;
        src=&quot;/static/53a3d09ee563101d5bd6bb5c95eea48c/73fd0/Code-Review-at-Microsoft-Graphics.png&quot;
        srcset=&quot;/static/53a3d09ee563101d5bd6bb5c95eea48c/5a46d/Code-Review-at-Microsoft-Graphics.png 300w,
/static/53a3d09ee563101d5bd6bb5c95eea48c/0a47e/Code-Review-at-Microsoft-Graphics.png 600w,
/static/53a3d09ee563101d5bd6bb5c95eea48c/73fd0/Code-Review-at-Microsoft-Graphics.png 793w&quot;
        sizes=&quot;(max-width: 793px) 100vw, 793px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Benefits of code reviews&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class=&quot;bctt-click-to-tweet&quot;&gt;Developers do code reviews to improve the code, to find defects, but mostly to increase the knowledge transfer amongst team members and for the learning effects. &lt;a href=&quot;https://twitter.com/intent/tweet?url&amp;text=Developers%20do%20code%20reviews%20to%20improve%20the%20code%2C%20to%20find%20defects%2C%20but%20mostly%20to%20increase%20the%20knowledge%20transfer%20amongst%20team%20members%20and%20for%20the%20learning%20effects.&amp;via=mgreiler&amp;related=mgreiler&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Click to Tweet.&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;But how does a developer typically do code reviews?&lt;/h2&gt;
&lt;p&gt;Code reviews can be performed in many ways. Sometimes, it is as informal as one developer walking over to another developer’s desk to look at some code together. Other times, teams review code together in groups. But the most likely scenario you will encounter for code reviews at Microsoft is that code reviews are done with the help of tools.&lt;/p&gt;
&lt;h2&gt;Code reviews at Microsoft are most often done via an internal tool&lt;/h2&gt;
&lt;p&gt;There is a wide variety of code review tools available, and at Microsoft, teams are free to choose their tooling. In 2016, 89% of the developers indicate to use the CodeFlow code review tool. I will explain more about this &lt;a href=&quot;#ms-tool&quot;&gt;code review tool at Microsoft&lt;/a&gt; later. Since then, and with the rise of Git, the tooling landscape has changed. I’ll add updated numbers as soon as they become available. But, let us consider a typical review situation:&lt;/p&gt;
&lt;p&gt;Let’ imagine a developer at Microsoft, and let us call her Rose. Rose just finished a part of a feature and now wants feedback from her peers.&lt;/p&gt;
&lt;h2&gt;How does Rose start a code review at Microsoft?&lt;/h2&gt;
&lt;p&gt;Well, as said, Rose is ready to get some feedback. Therefore she first prepares the code for review. This step includes that she opens the code review tool, that allows her to preview the code change. The code review tool performs some diffing tasks that help Rose to see exactly which changes she has done.&lt;/p&gt;
&lt;p&gt;After carefully reviewing those changes, she prepares a small note that tells the reviewers what she did and why she did that. This note helps the reviewers to understand the purpose of the code change and its motivation. Now the code is ready to be sent to the reviewers.&lt;/p&gt;
&lt;h2&gt;How does Rose select the right code reviewers?&lt;/h2&gt;
&lt;p&gt;Many experienced developers know who should be on the code review. Nevertheless, for people new to the team, or for new areas of work the selection can be a bit more tricky. If Rose does not know who she should add, she would either look at the team policies or ask her colleagues. She can also use a recommendation feature of the code review tool that helps select reviewers based on experience and knowledge of the code base.&lt;/p&gt;
&lt;h2&gt;Who are appropriate reviewers?&lt;/h2&gt;
&lt;p&gt;Rose selects reviewers that she thinks can contribute their knowledge to this piece of code. The reviewers are often other developers, but can also include other stakeholders, such as dev-ops engineers, UI experts, or also managers. Some reviewers are selected for their expertise, others are selected in order to stay informed about a coming change.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 414px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 158.33333333333334%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAgCAYAAAASYli2AAAACXBIWXMAABJ0AAASdAHeZh94AAAEjklEQVRIx5VWS2wbVRSdDeoGiS5ZsajY8JMACcGODSxYARsQElt2iEZhEYEKRKIIsohAIovIdaU0StqmilJCRHGT0pSqaez4b8dK7PjvicdOHP9nxh7PzEH3eTwZ22kTrvT03ry5OnPe/Zw3nK7r0DQN1tk6aI9sZWUFCwsL6JqOlqahrqpoqCpEtetD/hxOMVVV2Tw7O4upqSkDT4e30cRqpYY/ShV4G+IxoCRJyGaz4HkemUwG+/v77JkGOZAlk0lMTk5iYmICwWCQ7XlqDaxVarAJBwg2LYBHR0cIBALweDyIRCJsHQ6HEY1GmZMgCJiensbY2BhGR0cZy2QiAb/cxnyxhN/zRfitDGmxt7eHzc1NxoRAaU1syWiOx+MYHx/HyMgI800kEvBJMtbKVcwdlBCwMuwF/kmj5+hwOLC8vIxWq8X2UpKMcFOCryEiLrf6AZ9mvWybzwPvBn3ZkUVRRKlUQrVaRaVSAcWV1lZHYqsajB3lKrZFia01S4mRMcB0Og2v18viQzHc2trC9vb2EMOOMV9MZLFUKnfLaoA9A2y32wyIgAnU5XKhXq8fAxpMyFz1Jl5wh/BBJIaS0jFZ9qwPcGdnB7u7u/D7/Tg8POxj2GMpaRo+jyYxkROGjmzGkBapVIrVHgHS3IshAzJY4oQEWj9mZvlJmbY6EhgVR1TX8UAHXGoRWS1ppr0vKaeVDYEVdB1Lug67rsMGwK40MSPdxD11FS29fcyQyqHZbJqDepsGFTATBl0HFcgKgCsAFnUNax0dDimJhc48bMoVrCvrjCkFhqOEUB9TZp1OJ0sIZXtjYwMpo/2CioKLwgFuaxq8goBUsYjUwQEelJ24rl3HTOsaikqx/8gERMnI5XLw+XxoNBqmVH0aiYFbe4RveQE/LdzCy1dseM1mx6XFOdzDn7jatsEneRhLdmTqEgIjcSAhoBLK5/OQW93YvB+Ogrv/GB+Go3C4nPjorgOf3XVgZvMx7PJ9/FKex1+lRJdhp9Nh7IgVAYVCIdYlXo8HGZ5nTr/xBXDrTjy36cNqXYSoaRB1DXa5gnf4MN5N+xBs1M+WZbJaR8WLnhADPf9oC5+kI/i4EMWbfAgXsn58l4+z0FCnP1W+6F2vV3dECa+6wzjvdOGVXBAXsgG8kQng0n4MLUUxu+ZU+YIFtK2pWC6W8Gshi6tHPPz1itk9mrWwZVlmYkCDapHkjNaK8WUrKFmlrSDW7MqXioHWo4Xb7WayT31MdwrNJGG1Wq2vrRRjptvui720wVrr62nzyHTLETApTiwWY90y1M+G2nwZz+B1f2RIZNFLChkdlSSrXC4z1aZyOkm+yL5KZPGSdxt7kjwkYdxJd8OJamNRbLJ8u23uaYPyNchkUOOsUh+VZLwV2sXz7hAuGyI7lOXTTLMk5b3QLri/18GtPgT3zwa+TubY/82Z/216DOsdFW8T2OpDnJu7hWfmF3Hu9h0G+k2aNz/InZVdvtXGs84AuKU74GZugLuxBO7aTaZCP/OCGc//deR/q3V8n83jMl/Aj3wBP+QE2AuHULTjpPwHkIxK1KGA1v4AAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;common steps of a code review&quot;
        title=&quot;Common steps of a code review&quot;
        src=&quot;/static/b9194c3d1e90ea25f8e56184ddde8c76/b910a/Code-review-cycle.png&quot;
        srcset=&quot;/static/b9194c3d1e90ea25f8e56184ddde8c76/5a46d/Code-review-cycle.png 300w,
/static/b9194c3d1e90ea25f8e56184ddde8c76/b910a/Code-review-cycle.png 414w&quot;
        sizes=&quot;(max-width: 414px) 100vw, 414px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Rose requests feedback from her peers&lt;/h2&gt;
&lt;p&gt;Once everybody is selected, Rose sends out the code review (by pressing the send button 😄). The code review tool sends notifications automatically to inform everybody that a code review has been created. Notifications are sent to all reviewers. But, often additional parties, such as managers or product managers of other teams are also added to the notification list and are automatically informed for each review. Those notifications allow them to stay in the loop. They are not required to perform the review.&lt;/p&gt;
&lt;h2&gt;Receiving feedback is an iterative process&lt;/h2&gt;
&lt;p&gt;Once Rose’s colleagues have time, they will look at the code review. Each reviewer can annotate the code and add comments. Once finished commenting, the reviewer sends the annotated code back to Rose. Rose can now work on the comments and prepare a new improved version of the code.&lt;/p&gt;
&lt;p&gt;Reviewers normally look for things like: does the code look bug-free? Is there an architectural problem? Are there minor issues such as missing comments, or spelling mistakes? Not all comments are equally valuable. But, there are &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/devops/learn/devops-at-microsoft/boosting-code-reviews-useful-comments&quot;&gt;several best practices to boost the value of code review comments.&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Rose prepares a new improved version of the code&lt;/h2&gt;
&lt;p&gt;Rose works on the feedback by fixing and addressing the suggestions. If Rose sees that there are some misconceptions or other contentious issues, she might walk over to a colleague to discuss this in person. That’s sometimes easier and more personal than through the tooling.&lt;/p&gt;
&lt;p&gt;Anyway, once she finished working on all the feedback, she sends a new version of the code to the reviewers. That new improved version is called a revision.&lt;/p&gt;
&lt;p&gt;If needed, she will receive further feedback. Whether or not this cycle continues for a few times depends on the type of change and its quality. For simple and small code changes, often only one code review revision is needed. For other more complex changes or changes in the problematic code, several iterations might be necessary.&lt;/p&gt;
&lt;p&gt;It is totally normal, and partly desirable that this code review feedback cycle sparks some discussions between the author and the code reviewers.&lt;/p&gt;
&lt;h2&gt;All reviewers approve and Rose checks-in the code&lt;/h2&gt;
&lt;p&gt;After this review cycle, reviewers mark the code as okay, and Rose can finally check-in the code into the common code base.&lt;/p&gt;
&lt;p&gt;Some teams have policies, that allow the developer to check-in the code before an actual review is completed. This is normally restricted to small and trivial changes, in order to allow asynchronous reviews and to speed up development.&lt;/p&gt;
&lt;p&gt;All steps I describe are part of a typical code review life cycle at Microsoft and are performed by all teams. Depending on the team’s policies, teams are more strict or rigorous for each of the steps.&lt;/p&gt;
&lt;h2&gt;Not all teams are the same&lt;/h2&gt;
&lt;p&gt;As you can imagine, not all 60,000 engineers, and not all of the thousands of teams do the same. Some teams at Microsoft have additional steps or tools they require during the code review life cycle. I want to give you a short overview of some additional steps that teams add to the code review process.&lt;/p&gt;
&lt;h2&gt;Code reviews including test results&lt;/h2&gt;
&lt;p&gt;What you do not want is to waste time by reviewing “automatically detectable” buggy code. I mean, if you could run automated tests and realize that the code does not work as expected, then, that’s what you should do: Run the tests before the review.&lt;/p&gt;
&lt;p&gt;That’s why some teams require test results to be submitted with each code review. This way nobody can forget about running the tests. And it assures that the tests have actually run and passed for the given code change.&lt;/p&gt;
&lt;p&gt;Other teams went even a step further and configured the code review tool in such a way that for each code review a developer submits, a build is triggered. That build contains that exact change, and also starts a series of automated tests. The results of this build and these tests are attached to the code review. Configuring it this way ensures that the code changes have been tested with the latest code changes from the common code base.&lt;/p&gt;
&lt;h2&gt;Code reviews including user interface&lt;/h2&gt;
&lt;p&gt;If changes affect the user interface, it is also a smart idea to require the developer to submit a screenshot. That way the code reviewer can see the effects of the code change without running the code. Second, the code reviewer can spot discrepancies when running the code on her machine.&lt;/p&gt;
&lt;h2&gt;Code reviews including static analysis&lt;/h2&gt;
&lt;p&gt;Static analysis tools are only as good as their configuration, but, in terms of styling issues, they can save a lot of time for code reviewers. Some teams at Microsoft use automated static and dynamic analysis tools as dedicated bot-reviewers. Those bots comment on code styling and other static issues. Thus, freeing up time for human code reviewers to perform more interesting tasks.&lt;/p&gt;
&lt;h2&gt;Microsoft’s code review tool&lt;/h2&gt;
&lt;p&gt;For many years, one of the de facto standards for code review at Microsoft was an internal tool called CodeFlow. This is a sophisticated code review tool that supports developers and guides them through all steps of a code review. CodeFlow helps during the preparation of the code, automatically notifies reviewers, and has a rich commenting and discussion functionality.CodeFlow is a UI-heavy tooling, much like Word or PowerPoint, as you can see in the screenshot below.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 451px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 75%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAADgElEQVQozyWQ7U8aBwCH71/Z5yX7YPahJmu3Tlu1sYhax6zbOpppVmzT0UzBdqkze0mjabLMdOoW5jqHkyKyVHANGMReDzwIlU7l9bjjuPfTO+6Ol8OC3GL6fH/y5PcD0ALi2fA4Vhw2m82+9Oey66lj1fXX0tL83PxvCwsLc/Pzv8zNPnoEPXF6fL8/9v265l5dc7sdNltsZQV4+HCmo+Ni+4WL750919raevtri9256vV4lux2h9Pp+sf9xLW64lwOezeC225PcNnpdK25vU+9npmfZwGz6XrfpfOGnu7+7o7utnNT30xkEUTTtGq9oUqCKrCqwNVEXuTIkiioklgtS41jVSlKlrFx4NnsT2bj0NUrPZ9f0V+93HV/Ynxv/+DkpCmVKweR4H5o4z/o31fQBrYLssg+gx7kcwdoZi+XSVgtVuCP6albX3zy6WeDQx/39vZ0/vjDVCKZbJycKNUadygILC6yeZHDRRZXeKqqiBVZOK7IHE3evHkLuHt/8JL+nWvGtsHBM7qetx88sCaT6TdlMvEKiXrT8Fpix3UQdvKJlzKGiNmklEsRif0bJhPw/XdfDhjeN17XDQ219faemZn59lRuaoIoSfH460olz9B5kijQdJ4gMBzHCYJiWYKiRkdHgTvmax+0v9vVdfbD8y0tLW+ZbhiTyVSz2VSq6rEsv67ViEIBQ1GOYxVZLoriIc8Xi8VMJjMyMgLcu2dpv9DWo79sMAwYPuofGOiHI9FG46RWr2uaVq/XSZIkCKKA4yTDUDSNYRjLsqlUanh4GMilknksj+MFWZI1TUsjWcj3TFIOm03tjSwIglgsSrJMx2Ly0RHLc0fCEUEQJpMJwPOnoDkUyeXYHBILh16AoKLIqqo2Go1SqRTfi8fjcZphMoGASPMvs+H10N8kQZtGTQBFURiG5RAki6IUCMY2Nx/b7bu7u/F4fAeGX4Cgf3PT7/cHAgEoEgEh6DkIhsKhUCh0uplhWZqmSZKkGaZarWTS6TAcFotiqVQiGBZFMZpmGIbhOI4oFCiSJEmKppl0On369uLiotlsHh8bs1onrBbLna9uJxKJeqOuKIogigzDiLIsURQPQZVSqaqq5XK5VqvxPG80GoHJycnOzs6+vj69Xq/T6QwGw7pnfSu4tb29HdgK+ny+5yC4A0Ehvx+GYTgSgWE4Go2CIDg9Pf0/U3uSXPJ3RwYAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Screenshot of CodeFlow (in 2016) &quot;
        title=&quot;Screenshot of CodeFlow (in 2016) &quot;
        src=&quot;/static/039c6a5a2e292338fa77d260d2349f89/38070/Example-of-Code-Review-using-CodeFlow.png&quot;
        srcset=&quot;/static/039c6a5a2e292338fa77d260d2349f89/5a46d/Example-of-Code-Review-using-CodeFlow.png 300w,
/static/039c6a5a2e292338fa77d260d2349f89/38070/Example-of-Code-Review-using-CodeFlow.png 451w&quot;
        sizes=&quot;(max-width: 451px) 100vw, 451px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;CodeFlow’s interface explained&lt;/h3&gt;
&lt;p&gt;You can skip this if you want, but for all interested, I am walking you through the interface of CodeFlow. Looking at the screenshot, on the left (A) you see all affected documents.&lt;/p&gt;
&lt;p&gt;Also on the left, you see (B) the list of reviewers assigned to the review as well as their status (e.g., signed-off or pending). The active document is shown in the editor (C). At the bottom, you see (D) a list of comments for all documents.&lt;/p&gt;
&lt;p&gt;On the other hand, in the active document (F) is one single comment. This comment is connected to the concrete part of the code (i.e., one word in a line). Finally, at the top, you see the overall status of the code review. In this case, completed. The numbers before signal the different revisions. In this review, there have been five revisions.&lt;/p&gt;
&lt;h2&gt;Commenting functionality&lt;/h2&gt;
&lt;p&gt;One of the nicest features of CodeFlow is its commenting functionality.&lt;/p&gt;
&lt;p&gt;A code reviewer can select very precisely the parts of the code she wants to comment on. For example, a reviewer can even highlight just one or two characters in a line, instead of highlighting a whole row. Then, the reviewer can attach a comment to that selection.&lt;/p&gt;
&lt;p&gt;The code author or other reviewers are notified of this comment and can start a conversation in the form of a thread around this comment.&lt;/p&gt;
&lt;h2&gt;Discussion functionality&lt;/h2&gt;
&lt;p&gt;This commenting functionality feels like commenting on social media platforms, such as Twitter or Facebook. Therefore, the commenting experience in CodeFlow feels very natural and allows for rich conversations and discussions. Another nice perk is the possibility to assign a status to each of these comment threads. The status can, for example, be “won’t fix”, “resolved” or “open”.&lt;/p&gt;
&lt;h2&gt;Comparison between code review revisions&lt;/h2&gt;
&lt;p&gt;A helpful feature is the possibility to select two different revisions of the code review and compare the differences between that. This means that you can see exactly which changes the code review author has performed between one code review revision and another one. That’s super handy to track the progress of the review.&lt;/p&gt;
&lt;h2&gt;Code review analytics tool&lt;/h2&gt;
&lt;p&gt;Developers spend a substantial amount of their time performing code reviews at Microsoft. To ensure this time is well spent, Microsoft has its own code review analytics platform.&lt;/p&gt;
&lt;p&gt;This platform stores all code review data starting from the code under review, the developers involved in code reviews, to all comments of the developers. Even the code changes for each of the revisions can be traced back.&lt;/p&gt;
&lt;p&gt;This &lt;a href=&quot;https://queue.acm.org/detail.cfm?id=3292420&quot;&gt;code review data is the base for several empirical studies&lt;/a&gt; on code reviews at Microsoft. It is also used by many product teams for tracking their productivity and to understand their own code review practices. Also, many of the insights I share in &lt;a href=&quot;/code-review-blog-post-series/&quot;&gt;this blog post series about code reviews at Microsoft&lt;/a&gt; stem from studies and analyses that involved this code review data.&lt;/p&gt;
&lt;h2&gt;The future of code review at Microsoft&lt;/h2&gt;
&lt;p&gt;With Micorosft’s engagement and acquisition of GitHub change was inevitable. The change is visible by the vast adoption of Git as a source control tooling within Microsoft for example. But, this also means that at Microsoft code reviewing in the form of pull requests is on the rise.&lt;/p&gt;
&lt;p&gt;I’ll definitely plan to address code reviewing using pull requests at a later time.&lt;/p&gt;
&lt;h2&gt;Want more on Code Reviews?&lt;/h2&gt;
&lt;p&gt;Check out my &lt;a href=&quot;/workshops/&quot;&gt;code review workshops&lt;/a&gt;! Yes, through remote and onsite workshops, I help teams all around the world to make code reviews their superpower. ♥️&lt;/p&gt;
&lt;p&gt;Also, have a look at my other articles about &lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;proven code review best practices&lt;/a&gt;, learn about which &lt;a href=&quot;/fundamentals/challenges/&quot;&gt;code review pitfalls&lt;/a&gt; you should avoid, and also how to &lt;a href=&quot;https://www.michaelagreiler.com/great-code-review-feedback/&quot;&gt;boost your code review value with great feedback&lt;/a&gt;.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;strong&gt;Credit where credit is due:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I would like to mention my wonderful colleagues at Microsoft and the University of Victoria that have been part of this study: &lt;a href=&quot;https://www.microsoft.com/en-us/research/people/cbird/&quot;&gt;Chris Bird&lt;/a&gt;, &lt;a href=&quot;https://www.microsoft.com/en-us/research/people/jacekcz/&quot;&gt;Jacek Czerwonka&lt;/a&gt; and &lt;a href=&quot;http://lmacleod.com/&quot;&gt;Laura Macleod&lt;/a&gt; and &lt;a href=&quot;http://margaretstorey.com/&quot;&gt;Margaret-Anne Storey&lt;/a&gt;. I loved working with you on this ♥&lt;/p&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;To &lt;strong&gt;stay in the loop&lt;/strong&gt; and never miss a blog post, &lt;strong&gt;sign-up&lt;/strong&gt; to my email list. Also, &lt;a href=&quot;https://twitter.com/mgreiler&quot;&gt;let’s connect on Twitter&lt;/a&gt;. I prepared an exclusive &lt;a href=&quot;https://www.michaelagreiler.com/code-review-e-book/&quot;&gt;Code Review e-Book&lt;/a&gt; for my e-mail subscribers to help you remember the code review best practices. I also added other great insights and summaries about code reviews. Get the 20-page insights to code reviews now. Not a subscriber yet? Just sign-up.&lt;/p&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “Code Reviews at Microsoft”: &lt;a href=&quot;https://www.michaelagreiler.com/code-reviews-at-microsoft-how-to-code-review-at-a-large-software-company/&quot;&gt;https://www.michaelagreiler.com/code-reviews-at-microsoft-how-to-code-review-at-a-large-software-company/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2023-01-17T09:59:30+01:00&quot;&gt;January 17, 2023&lt;/time&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[The Ultimate Code Review Blog Post Series]]></title><description><![CDATA[In this code review blog post series, I share my experiences and lessons learned about code reviewing. Primarily, I show you code reviewing…]]></description><link>https://www.awesomecodereviews.com/code-review-blog-post-series/</link><guid isPermaLink="false">https://www.awesomecodereviews.com/code-review-blog-post-series/</guid><pubDate>Sun, 17 Mar 2019 13:40:13 GMT</pubDate><content:encoded>&lt;p&gt;In this code review blog post series, I share my experiences and lessons learned about code reviewing. Primarily, I show you code reviewing best practices to boost your code quality. But, you also learn which pitfalls to avoid while performing code reviewing.&lt;/p&gt;
&lt;p&gt;The foundation of those code review blog posts is my experience analyzing and improving code review practices and tooling at Microsoft. I worked with hundreds of engineers and analysed thousands of code reviews. You can see this code review blog post series as an intense crash course to learn about code reviewing best practices.&lt;/p&gt;
&lt;div class=&quot;row p-5&quot;&gt;
&lt;div class=&quot;col-4&quot;&gt;
&lt;span class=&quot;gatsby-resp-image-wrapper&quot; style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 860px; &quot;&gt;
      &lt;span class=&quot;gatsby-resp-image-background-image&quot; style=&quot;padding-bottom: 65.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAIEAf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAGu5sGAT//EABoQAAEFAQAAAAAAAAAAAAAAABEAAQMQEhP/2gAIAQEAAQUCaaTW26IICv/EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABoQAAICAwAAAAAAAAAAAAAAABARABIhMUH/2gAIAQEABj8CWJXuyx//xAAcEAACAgIDAAAAAAAAAAAAAAABEQBRECExQWH/2gAIAQEAAT8hIDYzUPoggwlROh3BxP/aAAwDAQACAAMAAAAQkx//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/ED//xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAECAQE/ED//xAAcEAEAAgMBAQEAAAAAAAAAAAABABEhMUFxUWH/2gAIAQEAAT8QxOg4L6m8Ygw2sUbJ4X5N9AXoS4AQKsZr5cVh/J//2Q==&apos;); background-size: cover; display: block;&quot;&gt;&lt;/span&gt;
  &lt;img class=&quot;gatsby-resp-image-image&quot; alt=&quot;Screenshots of Dr. Greiler&apos;s code reviews book&quot; title=&quot;Screenshots of Dr. Greiler&apos;s code reviews book&quot; src=&quot;/static/1c1c1319295d58749fdaeef267ef17d4/8d3e2/E-Book-Preview.jpg&quot; srcset=&quot;/static/1c1c1319295d58749fdaeef267ef17d4/f93b5/E-Book-Preview.jpg 300w,
/static/1c1c1319295d58749fdaeef267ef17d4/b4294/E-Book-Preview.jpg 600w,
/static/1c1c1319295d58749fdaeef267ef17d4/8d3e2/E-Book-Preview.jpg 860w&quot; sizes=&quot;(max-width: 860px) 100vw, 860px&quot; style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot;&gt;
    &lt;/span&gt;  
&lt;/div&gt;
   &lt;div class=&quot;col-6&quot;&gt;
   Get Dr. Greiler&apos;s exclusive &lt;a href=&quot;https://www.michaelagreiler.com/code-review-e-book/&quot;&gt;Code Review e-Book&lt;/a&gt; describing all code review best practices at Microsoft and Google. It also had more great insights and a complete code review checklist. Get the 20-page insights to code reviews now. Not a subscriber yet? Just sign-up &lt;a href=&quot;#newsletterId&quot;&gt;below&lt;/a&gt;.
   &lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;What is Code review?&lt;/h2&gt;
&lt;p&gt;Code reviewing is a widely adopted and adapted engineering practice. Its main aim is to improve software quality. In addition, sharing knowledge among team members is another important benefit of code reviewing.&lt;/p&gt;
&lt;p&gt;Even though code reviewing provides several other benefits, you have to be aware to follow best practices. Otherwise, you might tap into several pitfalls.&lt;/p&gt;
&lt;h2&gt;Microsoft’s code review process&lt;/h2&gt;
&lt;p&gt;I have been working at Microsoft as a software engineer and researcher for several years. My main focus was to analyze and improve engineering practices and tools. One of the key areas I focused on was code reviewing.&lt;/p&gt;
&lt;p&gt;In this blog series, I am going to share the key insights and lessons learned about code reviewing at Microsoft. All of them are backed by research and are grounded in actual experiences and knowledge from high performing engineering teams. At Microsoft, I performed several large-scale studies involving thousands of engineers and millions of code review comments. The lessons learned presented in this code review blog post series are derived from those empirical studies.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 874px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 57.333333333333336%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAALABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAwQA/8QAFQEBAQAAAAAAAAAAAAAAAAAAAgH/2gAMAwEAAhADEAAAASnSkOrNjP/EABsQAAEEAwAAAAAAAAAAAAAAAAEAAgMREhMx/9oACAEBAAEFAtlsEhqiouMGUhX/xAAXEQADAQAAAAAAAAAAAAAAAAAQERIh/9oACAEDAQE/AZxj/8QAFxEAAwEAAAAAAAAAAAAAAAAAAAECEf/aAAgBAgEBPwGWPT//xAAcEAACAgIDAAAAAAAAAAAAAAAAAQIREiEQMWH/2gAIAQEABj8CUaFbeR2xeEct74//xAAaEAEAAwEBAQAAAAAAAAAAAAABABEhQYHR/9oACAEBAAE/IRscY+RJKTQfYUb5s1b0VCrCi5DTk//aAAwDAQACAAMAAAAQW9//xAAXEQEBAQEAAAAAAAAAAAAAAAABABEh/9oACAEDAQE/EHoGMy//xAAWEQEBAQAAAAAAAAAAAAAAAAABEQD/2gAIAQIBAT8QFYmRZd//xAAbEAEBAAMAAwAAAAAAAAAAAAABEQAhQTGBsf/aAAgBAQABPxBjdZFg+GvuFpCHhZ7Y+iLzQczTA5pJTeF1ZCi6GbwIiEz/2Q==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;People working on computers in a group&quot;
        title=&quot;People working on computers in a group&quot;
        src=&quot;/static/5e0495c30ed93e9abbd85a414f5a0959/ea717/code_review_nesa-by-makers-737053-unsplash.jpg&quot;
        srcset=&quot;/static/5e0495c30ed93e9abbd85a414f5a0959/f93b5/code_review_nesa-by-makers-737053-unsplash.jpg 300w,
/static/5e0495c30ed93e9abbd85a414f5a0959/b4294/code_review_nesa-by-makers-737053-unsplash.jpg 600w,
/static/5e0495c30ed93e9abbd85a414f5a0959/ea717/code_review_nesa-by-makers-737053-unsplash.jpg 874w&quot;
        sizes=&quot;(max-width: 874px) 100vw, 874px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The series consists of 9 blog posts. You can read each one of them separately. Still, you might get the best out of it reading it consecutively.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;/code-reviews-at-microsoft/&quot;&gt;Code Reviews at Microsoft&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
In this post, I explain how a common review process looks like at Microsoft, and which code review tool is mostly used at Microsoft.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;/fundamentals/challenges/&quot;&gt;Code review pitfalls: learn which problems slow your team down&lt;/a&gt;&lt;/strong&gt; In this post, I deep dive into the main code review pitfalls teams face when practicing code reviews.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/best-practices/code-review-best-practices/&quot;&gt;&lt;strong&gt;Proven Code Review Best Practices&lt;/strong&gt; &lt;/a&gt;&lt;br&gt;
Learn which code review best practices make your team productive and boost code review feedback value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;/respectful-constructive-code-review-feedback/&quot;&gt;How to give great feedback&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
The benefits of code reviews rise and fall with the quality and value of the feedback. In this post, I show you proven ways to boost your code review feedback.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;/code-reviews-at-google/&quot;&gt;Code Reviews at Google &lt;/a&gt;&lt;/strong&gt; Code reviews at Google are lightweight and fast. Code reviews are completed in under 5 hours. That’s much faster than most other large software companies. In this post, I show you why.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;/checklists/code-review-checklist/&quot;&gt;Code Review Checklist &lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
If you want to boost your productivity and your rigor at the same time, a code review checklist is what you are after. This one is also downloadable.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://www.michaelagreiler.com/accept-code-review-feedback/&quot;&gt;Don’t criticize my code&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
Even the most useful, well-intended and well-written feedback can sting. This post discusses why that is and what you can do about it.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.michaelagreiler.com/teach-during-code-reviews/&quot;&gt;&lt;strong&gt;Don’t teach during Code Reviews&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
In this post, I’ll show you a common pitfall you should avoid when you set out to teach during code reviews.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Organizational Trade-offs to consider during Code Review Process Design&lt;/strong&gt;&lt;br&gt;
Even if you are aware of all the best practices, there are several trade-offs you have to keep in mind. For example, do you favor review speed or review rigor? In this article, I dive into this topic.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wrap-up post&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;p class=&quot;article-source&quot;&gt;Official source for “The Ultimate Code Review Blog Post Series”: &lt;a href=&quot;https://www.michaelagreiler.com/code-review-blog-post-series/&quot;&gt;https://www.michaelagreiler.com/code-review-blog-post-series/&lt;/a&gt;. Last updated: &lt;time datetime=&quot;2019-03-17T14:40:13+01:00&quot;&gt;March 17, 2019&lt;/time&gt;&lt;/p&gt;</content:encoded></item></channel></rss>