Re:Ask HN: Do you pull and run code as part of code review?
by nameisname on Sunday March 06, 2022 @07:29PM
(#30582727)
Wouldn't it be better to ask in the MR if they could just write a test to cover that case? It prevents wasting your time writing a test case that's going to be thrown out and prevents the other engineer from being blind sided by someone else committing a test case to their branch. I'm really not sold that the approach you're taking is of more value than just asking the MR author to add the test themselves.
[ Parent
| on HN ]
Re:Ask HN: Do you pull and run code as part of code review?
by koyote on Monday March 07, 2022 @04:40AM
(#30585842)
That's a good point and you are right. I have simply asked for the engineer to write the test in the past, but sometimes my curiosity just gets the better of me and I want to try it out myself. Other times I am not quite sure what is wrong but it just "feels" wrong so I end up throwing a couple unit tests at it to see if my intuition was correct.
Note that this is quite rare and is maybe a once in a 100 code review occurrence. Usually it's quite obvious that something is wrong and you can just point it out or start a discussion about it.