If you look here: https://stackoverflow.com/review/suggested-edits/1365789 there's a missing semi colon that clearly breaks the code. What is the proper action here, accept or decline?

The 5 people that are indicated in this question were torn 3-2. My inclination is that it's still minor, and any IDE will pick it up when you paste the code in, however, I also hate the idea of rejecting someone's efforts to leave broken code, especially when it's an Accepted Answer (which I know shouldn't factor into my thought process).

  • 2
    Though it was a minor change, it was crucial. I would have suggested of approving it. – MysticMagicϡ Jan 21 '13 at 10:39
  • 5
    The general approach usually is, don't touch code, leave a comment. – Bart Jan 21 '13 at 10:43
  • 3
    @Bart: I disagree that's the "general approach", nor should it be. I've accepted many edits which fix blatant typos in the code. As long as the edit doesn't change the approach the OP attempted, I see nothing wrong with such edits. – Matt Jan 21 '13 at 10:48
  • 1
    Don't forget that it also adds noise, "fadeOutAnimation.setDuration(1000); //duration" just to push over the minimum changes threshold. – Time Traveling Bobby Jan 21 '13 at 10:53

You have to distinguish:

  1. In a question: Never touch the code!

  2. In an answer: It depends:

    • if it looks like a typo, I would edit/approve, but a comment is necessary. So In your example, it should be OK, to my opinion.

    • if it is more than a typo, don't approve/edit, only leave a comment and describe what you think should be changed.

  • The only concern I have is, when it's a semicolon or other minor issue like that, it's pretty obvious. However, I think reviewing suggestions should not matter whether you know the language or not - and by reviewing code corrections, you will have to know the syntax or construct of that language.For instance, one suggestion modified which static class was being class since the one invoked in the question didn't have the method that was being called. – ajacian81 Feb 1 '13 at 11:57

You must log in to answer this question.

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