3

I just got the pleasure to attempt to review this suggested edit.

It was a syntax correction, but was incorrect anyways (I think), so I was going to reject it. Well, it turns out other reviewers beat me to it by about 2 seconds (I didn't even get to submit my review), so it was approved.

There were two reviewers who did get a chance to review the suggested edit that rejected it for similar reasons to mine. So I rolled back the now approved edit.

Did I do the right thing?

And in general, are syntax corrections valid edits?

3
  • 1
    Sorry for being a fun-hater, but that tag... no, no.
    – Matt
    Commented Jun 9, 2014 at 16:30
  • @Matt How about [did-i-mess-up]
    – Andrew
    Commented Jun 9, 2014 at 16:34
  • 3
    @Matt fun-hater on meta? Nothing makes sense anymore
    – codeMagic
    Commented Jun 9, 2014 at 16:34

2 Answers 2

7

It was a syntax correction, but was incorrect anyways (I think), so I was going to reject it.

... so skip it.


In general, a correct syntax correction on an answer is fine. An invalid syntax correction, obviously, is not.

If you see a suggested edit which breaks a posts syntax, you should act as you should do with any invalid edit, and roll it back.

Syntax corrections to questions are an entirely different kettle of fish, as the syntax error is usually the cause of the question itself. These should almost always be rejected.


Specifically to this question, String.length() is correct, as is String.substring(), so this suggested edit was correct.

3
  • 1
    I think I actually misread the code as javascript, in which length isn't a function.
    – Andrew
    Commented Jun 9, 2014 at 16:45
  • 7
    @SantaClaus: Regardless of this particular case; if you see an edit which you aren't sure about, please skip it rather than guessing!
    – Matt
    Commented Jun 9, 2014 at 16:46
  • Here's something I thought of that jumps off of this question: meta.stackoverflow.com/questions/259960/…
    – Andrew
    Commented Jun 9, 2014 at 16:52
4

Yes, an edit that breaks the code in an answer should most certainly be rolled back. It's also probably worth flagging the post and informing the moderators that this incorrect edit had been approved, as this is a sign that these reviewers aren't paying attention and may need a break from reviewing.

1
  • 2
    Apparently people think that an edit that breaks code in an answer shouldn't be rolled back...
    – Servy
    Commented Jun 9, 2014 at 16:41

You must log in to answer this question.

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