A PR review guideline

Feb 7, 2025

This is a set of sources/articles that can be used to:

  • learn what standards PRs should meet
  • learn how you or your colleagues should handle PR reviews
  • reference on a PR that your comments/requirements are not only your wannabe but a general standard for code reviews in the IT industry

Standards

The Standard of Code Review
Google’s Engineering Practices documentation

Go

Naming

styleguide
Style guides for Google-originated open-source projects

Common Mistakes

Go Wiki: Common Mistakes - The Go Programming Language

Baseline

Effective Go - The Go Programming Language
Go Wiki: Go Code Review Comments - The Go Programming Language

Style Guide

guide/style.md at master · uber-go/guide
The Uber Go Style Guide. Contribute to uber-go/guide development by creating an account on GitHub.

100 Go Mistakes

Common Go Mistakes - 100 Go Mistakes and How to Avoid Them
Summary of the mistakes in the 100 Go Mistakes book.

Reviewer checklist

Many times, I struggled to get a quality review on a PR. I knew my code was not documented enough, not optimized, complicated, or... not understood by the reviewer, and I still got approval to merge that. It is pure frustration that we spent hours trying to make something work, giving our all to craft a PR, only to have it flash before someone's eyes when they click "Approve."

>  [!IMPORTANT]
>  Dear Reviewer, please go through the below checklist:
>  - [ ] Ensure you fully understand the changes in this PR, and ask for clarification if anything is unclear.
>  - [ ] Verify that the changes align with the PR description and follow coding best practices.
>  - [ ] Look for areas of improvement in readability, maintainability, performance, and security.
>  - [ ] Check if tests are sufficient, the commit structure is logical, and no unintended side effects exist.
>  - [ ] Run necessary tests, review documentation, and ensure the PR is good for merging. 🚀 

What's more, I will share a cheat with you, you can save that checklist as Saved reply.

Navigate to Github Settings page and select Saved replies.

And add a checklist there:

It is saved now:

So you can use it in PR description using / like this:

Krzysztof Wiatrzyk

Big love for Kubernetes and the entire Cloud Native Computing Foundation. DevOps, biker, hiker, dog lover, guitar player, and lazy gamer.