A Code Review Checklist the GDS Way: From PR Purpose to Documentation
The UK Government's GDS Way guidance sets out what to check and how reviewers should conduct themselves when assessing a pull request, so that code quality is maintained.
This article was prepared with AI assistance from the official sources listed below, and checked automatically before publication.
Without a clear standard, code review often depends on each reviewer's personal taste: one person focuses on variable names, while another only checks whether the code runs. As a result, quality is uneven and risks such as problematic dependencies or effects on the deployment process can be missed. The GDS Way, the internal guidance of the digital product community at the UK Government Digital Service (GDS), provides a "How to review code" page that summarises what should be checked and how reviewers should conduct themselves.
What review practice means according to the GDS Way
According to the GDS Way, a thorough review helps keep code maintainable and reusable, while also exposing gaps in documentation. Review is carried out through GitHub's review feature on a pull request (PR) before the code is merged. Responsibility lies with the author: they are the one who must obtain the review and perform the merge.
The guidance also asks reviewers to consider whether the change adds technical debt, and whether there are suggestions that could help reduce existing technical debt.
How it works in practice
First, the reviewer assesses the PR in general terms. The questions are:
- Does the PR have a clear purpose?
- Does it capture the simplest way to solve the problem?
- Does it propose changes outside the scope of the project?
- Does it need to be split into smaller PRs?
Second, the reviewer checks several specific areas:
- Coding style: relevant edge cases, patterns consistent with other code, readable variable names, elements that are missing or redundant after a merge or rebase, and potential for reuse. Linting checks are always performed, and automated linting before merge, for example with GitHub Actions, is worth considering.
- Libraries: changes must be backwards compatible, version numbers updated, and the changelog updated.
- Third-party dependencies: new or updated ones must come from a reliable and stable source, not break existing code, be genuinely needed, and be open source wherever possible.
- Testing: all error cases are covered, tests pass in all relevant environments, and test names explain what happens. The reviewer also considers whether unit tests are enough or integration tests are needed.
- Deployment: the change does not harm other applications or systems, does not introduce potential security problems, and can be deployed correctly.
- Documentation: before approving, check whether the PR affects existing documentation, and make sure the documentation is clear, unambiguous and in the right place.
Reviewer behaviour and common pitfalls
The GDS Way does not only govern what is checked, but also how reviewers behave. What is recommended:
- only approve PRs that you genuinely understand;
- give appropriate positive feedback;
- raise major problems quickly, meeting in person if necessary;
- ask for clarification on anything unclear;
- explain the reason for each suggestion, refer to the programming language style guide, and give a short example where it helps.
What should be avoided:
- rushing, even when the situation is urgent;
- pointing out the same pattern of mistakes over and over again;
- leaving comments without context.
The biggest pitfalls are visible in that list of things to avoid: deadline pressure turns review into a rubber stamp, and brief comments without reasons make it hard for code authors to learn.
How teams and clients can apply it
The list is general, so it can be adapted by both in-house development teams and vendors. Some steps to consider:
- Turn the checklist into a PR template or part of your internal SOP, so that every reviewer uses the same reference.
- For agencies or companies that use vendor services, the review standard can be written into the contract or work appendix so that expectations regarding dependencies, testing and deployment impact are clearly documented.
- Specify that the author is responsible for finding a reviewer and performing the merge, as in the GDS Way, so that ownership does not become blurred.
- Automate what can be automated, such as linting, so that reviewers' time is focused on design, risk and clarity.
- Build a culture of mutually respectful review: reasons are explained, progress is appreciated, and serious problems are discussed directly.
The GDS Way page itself lists a review schedule for the page owner, a reminder that review standards also need to be maintained and updated over time.
Sources & references
This article is a summary and interpretation by the Oemah Solution team of the sources below. Refer to the original sources for full details and context.
