This suggested edit attempts to format the code in the question.

Since this meta post states that it would be better to leave formatting advice as part of answer, I am inclined to reject this suggested edit.

On the other hand, the question was asked by a new user, and I have a strong feeling that they are not copying their code correctly from their editor and are possibly being lazy about fixing their indentation. So providing an answer saying "fix your indentation" would be worthless to them (though perhaps not to future visitors).

So what would be the best course of action?

  1. Approve the edit.
  2. Downvote the question (in an attempt to coerce the OP to fix the indentation).
  3. Provide an answer/comment (as done by @ComFreek) about fixing the indentation anyway.
  4. Other

2 Answers 2


The edit has already been rejected. Unless otherwise stated by the OP, it's not quite easy to tell if the bad formatting is from a copy/paste, laziness, or experience. If the indentation is addressed in an answer, even if the OP already knew about it (copy error), then the OP may have to acknowledge it since that was provided for review. It is up to the poster to make sure the code shows up as intended, otherwise it should be noted so that it's not reviewed (and possibly fixed instead).


Reject the Edit

We shouldn't be guessing at how the OP formatted his code. Worse case scenario, an answer comments that he should fix his indentation, and the asker replies "I've got it right in my IDE but couldn't get it right here."

That's literally the worst case scenario.

But if we assume that the asker did it right and then fix it for him, and we don't leave answers commenting on the indentation, then the user may be continuing to fail to indent, assume that the indentation edit was just our personal preference here, and continue to write poorly formatted code.


You must log in to answer this question.

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