I have edited this question as the code in it is not bracketed properly. One reviewer accepted it, but the OP rejected it. But what is the logic behind it? I want to draw moderators attention.


I asked OP and he told, "First saw the unnecessary indent change. Did not see the missing trailing } until after rejection." in his comment. Then I asked him that he read my comment in suggested edit or not, he did not answered till now.

  • 2
    \$\begingroup\$ I noticed you tried to push your edit again. Please don't. \$\endgroup\$
    – Mast Mod
    Commented Aug 29, 2015 at 0:18
  • \$\begingroup\$ @Mast It is my misfortune that author is not present now, otherwise he would accept. What is the problem with this edit? \$\endgroup\$ Commented Aug 29, 2015 at 2:59

3 Answers 3


I often reject such edits, albeit with a different reason.

The code posted by OP is how OP wrote it. It's the code he wants reviewed. Lacking decent indentation is something often pointed out in a review. This being edited away by somebody else than OP is against his intent and shouldn't happen on Code Review.

Editing it away before it gets reviewed does hinder a valuable learning experience.

  • \$\begingroup\$ I agree, you are reviewing code. You can't change it and then review it. You should only change the text with the code. \$\endgroup\$ Commented Aug 29, 2015 at 9:38

Should you edit some else's code in a question? Almost never.

  • If the code is poorly indented, state so in an answer. Whitespace is a reviewable aspect of the code.
  • If the code is written in a language where whitespace is significant, and the code is incorrectly indented, then vote or flag to close the question as broken code.
  • If braces are mismatched, then it's either an incomplete excerpt or broken code. You should ask for clarification in a comment whether there is more code.

The only exception would be if the author of the question obviously had trouble posting the code as intended, and the indentation is wrong in a consistent, systematic way. In that case, it's reasonable to help fix the Markdown so that it reflects the author's intention.


Here is the edit in question.

OP Chose to reject this with the following reason.

This edit does not make the post even a little bit easier to read, easier to find, more accurate or more accessible. Changes are either completely superfluous or actively harm readability.

I can't say I agree with OP. It does make it a little bit easier to read, but as Mast mentioned, indentation is subject to review, so I would have gone with the "Actively counters OP's intent" reason. Either way, this wasn't an appropriate edit.


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