What to Review Before Merging to `main`: A Practical Code Review Checklist
dev.to·1d·
Discuss: DEV
Ruff
Preview
Report Post

Merging to main is not a formality. It’s a commitment. Once code lands there, it becomes someone else’s problem, future you’s problem, and potentially production’s problem.

Here’s a checklist I use before approving any pull request. If these points aren’t met, the code is not ready.


1. Unit Tests Exist (or There’s a Real Reason They Don’t)

If there are no unit tests, the default assumption is that the code is incomplete.

Questions to ask:

  • Are unit tests present for new logic?
  • If not, is there a clear, documented reason why?
  • Is this logic testable at all?

“No time” is not a valid reason. “No idea how to test it” is a red flag.


2. Unit Tests Actually Assert Behavior

Tests without assertions are meaningless.

Things to verif…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help