9
\$\begingroup\$

The question I refer to is this one. It has been cross-posted from Stack Overflow, it hasn't received any reviews yet, however, it has been edited on SO, but not on CR. The edits made (indentation correction) are minor and would only affect the comments on CR, and since no answers have been posted yet, it would not invalidate any answers.

So can I edit it, to take into consideration the changes made on the SO post?

\$\endgroup\$
9
\$\begingroup\$

No. Do not edit.

First of all, that this question is cross-posted to Stack Overflow is irrelevant. The only time the code in a Code Review question should be edited is if it is clear that something went wrong when the original asker was copy & pasting from their IDE.

You might make a case for duplicating the edits from Stack Overflow if, and only if the Stack Overflow edits were done by the original asker, but they were not. And Stack Overflow has different editing rules.

Everything on Code Review, including indentation, is up for review. We should only assist the asker in making sure the code is presented on Code Review as it looks in their IDE. We should take no further steps to mask an indentation problem that needs to be commented on. If you edit out an indentation problem (no matter how minor you think it is), then you are preventing any reviewer the ability to comment on it and preventing the asker from ever hearing any advice on proper indentation.

In the end, this means that the asker's code is still sitting in their IDE poorly indented. We'll have to make that edit every time the asker posts a question. And actually, making that edit isn't such a big deal. But the point of Code Review is to improve code. And making that edit every time means that whoever has to maintain the OP's code will eventually have to deal with it because Code Review was never afforded the opportunity to tell the OP to fix it.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .