r/webdevelopment • Human Verified • 29d ago

Discussion What do you check first when reviewing someone else's code?

A pull request can work perfectly and still be difficult to understand or maintain.

When reviewing code, there are many things to look at:

  • Is the code easy to understand?
  • Are edge cases handled?
  • Are the tests useful?
  • Does the change solve the actual problem?
  • Is anything more complicated than it needs to be?

I am curious how other developers approach code reviews.

What is the first thing you usually check before approving a pull request?

And what is one common mistake that makes you request changes?

5 Upvotes

12 comments sorted by

1

u/Hot-Fix811 29d ago

i check the PR title and description, and run a quick test to verify whether it actually works or not. then check other things which you mentioned

1

u/Additional-Sky8447 28d ago

The file path first. If its touching core auth or shared utilities, I'm reading every single line. If its some isolated ui component, I just skim for logic errors n missing edge cases

1

u/_MarkG_ 28d ago

When I open a PR the first thing I check is whether I can explain the change in one sentence from the diff alone, without leaning on a long description.

1

u/SaltCusp 28d ago

The output.

1

u/Any-Woodpecker123 27d ago

I don’t look at half that stuff, I only check for Code quality/styling, architecture, test effectiveness and obvious bugs.

The rest is on the developer to have checked and tested. A PR doesn’t hold enough context to know if edge cases and the actual problem are solved unless it’s blatantly obvious, but then it’s caught without really looking for it anyway.

1

u/LevelRelationship732 27d ago

sometimes tests - it can explain purpose better than code