41

I encountered this suggested edit that changes the formatting syntax from using three backticks ``` to using four spaces indentation instead. Comment was:

Please use stacktrace

But I believe there aren't guidelines yet recommending a syntax or another, so I rejected this suggested edit. Did I review wrongly? Is there a preferred or recommended code syntax for our community?

10
  • 33
    This edit definitely wasn’t useful and the edit summary doesn’t make any sense. I don’t think we should prefer any specific syntax when editing or approving edits. After all, fenced code blocks were introduced just to make formatting simpler, and because it already exists in Markdown, not make reviewing harder. Edits that only change the formatting syntax should be rejected. Commented Jan 14, 2019 at 16:41
  • 7
    "Please use stacktrace"? Did he mean "backticks"?
    – Maroun
    Commented Jan 14, 2019 at 16:43
  • 6
    @Maroun This other edit’s summary reads “Corrected some stacktrace”, referring to .NET code… I think he confuses the terms “stacktrace” and “code”…? Commented Jan 14, 2019 at 16:51
  • 9
    Or see this one saying “Use code stacktrace”… I think he confuses the terms “stacktrace” and “formatting” Commented Jan 14, 2019 at 16:57
  • 4
    Thank you for this question - I learned about the three-backticks syntax, which before I didn't know at all.
    – Armali
    Commented Jan 15, 2019 at 10:07
  • 1
    In addition to other concerns mentioned, the edit had to be rejected because it impaired the formatting by misaligning the column header period_name.
    – Armali
    Commented Jan 15, 2019 at 10:13
  • 1
    Interesting -- when did SO start properly rendering triple-quoted multi-line sections as full-line quotes? I agree that that's the behavior now, but it certainly wasn't consistently so in the past; previously, triple-quotes rendered identically to single-quotes, with the sole exception that a non-tripled quote wouldn't end them. Commented Jan 17, 2019 at 16:17
  • 1
    @CharlesDuffy 10 days ago.
    – Cœur
    Commented Jan 17, 2019 at 16:41
  • The backticks are prone to mistakes, such as including words in "code".
    – S.S. Anne
    Commented Aug 24, 2019 at 14:34
  • 1
    There’s another case of an edit suggestion with the opposite direction: editing indented code blocks to code fences and nothing else. These edit suggestions should be discouraged as well. Commented Feb 15, 2021 at 16:50

3 Answers 3

73

No. Edits like those should be rejected for not making a meaningful improvement or making the post easier to read.

Edits that only change formatting are appropriate in very narrow circumstances, such as adding code formatting to a blob of code that was originally posted as plain text (especially if, say, the code includes < and >, which causes portions of it to be invisible if rendered without code formatting). This is pretty much the only reason a formatting-only edit is appropriate.

Also, as Makoto pointed out, the suggested edit in question left numerous problems with the post. This is bad. In general, edits that fix only a small percentage of issues with a post should be rejected or improved, whichever makes more sense under the circumstances.*

This particular situation (both the bad edits and the one bad review) has been addressed.


* To clarify an issue that has arisen in the comments, I’m not talking about rejecting an edit that improves, say, half of the major issues in a post. I’m talking about somebody correcting a few minor problems and leaving the post in terrible shape. Whenever possible, reviewers looking at such a suggestion should either approve the edit with improvements or reject, start from scratch, and make a better edit. In no case should we approve markdown-only edits (three backticks versus leading spaces, for example) that don’t even change the appearance of the post.

12
  • 18
    "In general, edits that fix only a small percentage of issues with a post should be rejected " - no, they shouldn't. There was an argument over this exact point with thousands of views and hundreds of votes in which the community strongly rejected that position, and no major debate over it since; the consensus, as far as I know, is still that a minor edit that nonetheless improves the post should be approved. The problem with this edit is that it didn't improve anything at all, not that it left some potential improvements unmade.
    – Mark Amery
    Commented Jan 15, 2019 at 11:56
  • @MarkAmery I agree this edit counts as no improvement whatsoever. I think Ed was referring to another meta post that said more or less "suggested edits should be complete and fix everything" that quite a few reviewers follow, and to be fair the editor missed some spelling errors. Though FWIW, I think the "complete edits" strategy can be harmful when taken to the extreme, sometimes fixing all the issues in a post brings you into something that looks like "deviates too far from intent" to a robo-reviewer.
    – jrh
    Commented Jan 15, 2019 at 13:09
  • 2
    @MarkAmery I think you’re misinterpreting my comment, of which you only quoted a fraction. I said, “In general, edits that fix only a small percentage of issues with a post should be rejected or improved, whichever makes more sense under the circumstances” (emphasis added). If a suggested edit makes 3 shoddy improvements to a post with 20 problems, it’s probably best to reject the edit and start over (not leave the post in bad shape). If it contains good fixes of some, but not all, major issues, it should be accepted and improved. Omitting the bulk of my comment changes its meaning.
    – elixenide
    Commented Jan 15, 2019 at 13:42
  • 4
    @EdCottrell Okay, that's a helpful clarification, but I still disagree. Reviewers aren't obliged to edit to fix issues that a suggested edit missed, any more than they're obliged to edit any other post they stumble across. It's entirely fine to just accept an edit that fixes half the issues in a post and then move on; the fact that the suggester cared enough the post to spend time editing it doesn't mean that the reviewer has to.
    – Mark Amery
    Commented Jan 15, 2019 at 14:38
  • 1
    @MarkAmery As I said, “In general, edits that fix only a very small percentage of issues...” I’m not saying to reject an edit that makes a big dent in the problems (like fixing half of what’s wrong) but isn’t perfect. I’m saying some edits are so minor and so badly executed that it’s best to start over and fix more of the issues that one can find.
    – elixenide
    Commented Jan 15, 2019 at 14:58
  • 3
    @EdCottrell Okay, fine, that's another useful clarification, but I still disagree. "Minor" and "badly executed" are orthogonal. Instead of "half the issues in a post", I could just as well have written "one small issue in a post that has lots of serious ones remaining", and I'd still stand by my previous comment. Sure, a minor edit can be badly executed and deserve rejection because it does harm or because you'd rather fix the issues in a better way starting from scratch... but so can a major edit. As far as I can see, the minor-ness of the edit is irrelevant.
    – Mark Amery
    Commented Jan 15, 2019 at 15:16
  • @MarkAmery I’m not saying they’re the same thing. I agree that they’re not; that’s why I said, “whichever makes more sense under the circumstances.” This Q&A is not about boundary conditions of rejection, approval, and improvement, so my comments about the unresolved problems in the suggested edit in question are (1) not comprehensive, (2) only an “in general” summary of the many other Meta discussions on this topic, and (3) not important enough to this Q&A to merit lots of explanation. Some edits that fix “a very small percentage of issues” should be approved, some rejected, some improved.
    – elixenide
    Commented Jan 15, 2019 at 15:22
  • 2
    This is nonsense. Improvements shouldn't be rejected because they don't fix everything. That's why we have an Approve and Improve button.
    – jpmc26
    Commented Jan 16, 2019 at 5:24
  • @jpmc26 Please read my full, actual statement: "In general, edits that fix only a small percentage of issues with a post should be rejected or improved, whichever makes more sense under the circumstances" (emphasis added). Your last sentence is not at odds with my comment; it's exactly my point.
    – elixenide
    Commented Jan 16, 2019 at 6:04
  • 1
    I think that you should modify that to read as "does not improve the post" instead. Otherwise, your point comes across as skirting around not mentioning the defunct "too minor" reject reason. The only criteria should be improve/does not improve in a meaningful way the post. Also, the criteria for the improve/reject and edit was whenever you actually used the editor work.
    – Braiam
    Commented Jan 17, 2019 at 4:25
  • If we come across an approved edit that merely changes backticks in indentation, how should it be handled? Reporting in some way (since the people that approved the edit shouldn't have)? Or would this be too minor to lose sleep over? Commented Apr 7, 2019 at 1:55
  • @1201ProgramAlarm For isolated incidents, this is too minor to lose sleep over. If you happen to see a pattern of bad edits or bad reviews, in which the same user keeps making or approving bad edits, raise a custom flag on an appropriate post and explain the problem. You don’t need to go looking for such things, though; just tel us if you see it. Thanks.
    – elixenide
    Commented Apr 7, 2019 at 2:14
29

No. These types of edits should be rejected, especially now that this type of formatting actually results in proper code formatting, and not half-broken formatting.

These types of edits make absolutely no difference on the post itself; the resulting formatting is identical. Not all formatting-only edits need rejection, but these types do. On the topic of formatting-only edits, in my opinion, only redundant ones (that make either no difference on the post display, that're actively destructive, or unnecessarily bold (and equivalently for other formatting types)) should be rejected.

The rest (such as appropriately formatting code, inline and otherwise) should be approved. Although some edits are barely at the 6 char limit, and those are another topic. There's a bunch of additional edge-cases aside these too.

Generally, edits should be constructive, mainly meaning they improve the post in some way. In my opinion, an invisible code-formatting type change isn't in that category.

There is, however, an exception to this: if it fixes broken formatting too. If it just adds code fences, and doesn't fix a problem such as an unformatted starting line, reject it. If it fixes a formatting problem, approve it.

1
  • 1
    Only reasonable answer here. Thank you.
    – jpmc26
    Commented Jan 16, 2019 at 5:21
-5

Reject all edits which only attempt to improve formatting. Those aren't the kind of edits that users without full editing privileges should be making anyway, since they don't really improve anything.

Worse, edits like this overlook other problems with the post. Removing "Any help appreciated" or similar would be a useful change, since that statement doesn't add anything to the question itself.

(I'm tempted to flag this question and get the person who actually approved this edit on the radar of a moderator...)

16
  • 19
    "Reject all edits which only attempt to improve formatting" - But sometimes improving formatting is a must, no?
    – Maroun
    Commented Jan 14, 2019 at 16:45
  • 7
    When you get full editing privileges, sure @Maroun. Then it doesn't come up in review queues like this. Until then - one shouldn't even touch it.
    – Makoto
    Commented Jan 14, 2019 at 16:47
  • I will submit that, had the editor fixed other errors, then at a minimum we'd have somewhere to start with. I'd have probably rejected the edit and removed the line myself instead of removing the line and changing how the code was formatted. But formatting edits alone? That's never been okay for those without full editing privileges.
    – Makoto
    Commented Jan 14, 2019 at 16:50
  • 11
    Not saying I necessarily disagree, but if we're taking the firm position that formatting-only edits are inherently always inappropriate for sub-2k users to submit, perhaps someone needs to post a feature request to update the Help Center documentation on editing? Because as it's written today, there's nothing that suggests to a new user that there's different rules for what edits are appropriate pre and post 2k reputation - just that sub-2k users will have their edits reviewed before they're applied.
    – Sam Hanley
    Commented Jan 14, 2019 at 17:31
  • @SamHanley: (By virtue of "formatting" being absent from that help document, I would hope one would infer that those are a no-no...but you have a point in that being more explicit is better.)
    – Makoto
    Commented Jan 14, 2019 at 17:32
  • Totally agreed, but would you make an exception if formatting really truly was the only thing wrong? Of course, this may be a pie-in-the-sky scenario...
    – jscs
    Commented Jan 14, 2019 at 21:44
  • 1
    @JoshCaswell: If formatting truly was the only thing that was wrong...then that shouldn't be handled by reviewers who have to have their edits sent to a queue. That should be handled by someone with full editing privileges. (Also it's vanishingly rare that there's just the one problem with a question if its formatting's messedup.)
    – Makoto
    Commented Jan 14, 2019 at 21:47
  • 1
    @Makoto "vanishingly rare" if you're talking about stuff like syntax highlighting too you should see my edit history... pretty much all of page 2 is that
    – jrh
    Commented Jan 15, 2019 at 3:32
  • 3
    Is it worth editing this to change "edits which only attempt to improve formatting" to "edits which only attempt to change how the post's markdown is formatted without making any visible change to the rendered post", assuming that's what you mean? I'd make the edit myself but I'm <100% sure that that's actually what you're trying to say. As it is, some commenters (e.g. @jrh above) seem to be interpreting your answer differently.
    – Mark Amery
    Commented Jan 15, 2019 at 12:02
  • 3
    I really have to assume that "formatting" in this context is specific to "code formatting" (based on the topic of the question). Otherwise, fixing "list formatting" (e.g. forgot to add a new line before the list) or "quote formatting" (e.g. didn't use quotation block for an obvious quotation) seems a valid edit suggestion for me (of course, if it passed the minimum 6-characters requirement).
    – Andrew T.
    Commented Jan 15, 2019 at 12:43
  • @MarkAmery yeah if that edit was made I'd reverse my downvote, I am 100% okay with not allowing suggested edits that only change markdown formatting with no visible effect.
    – jrh
    Commented Jan 15, 2019 at 12:56
  • 8
    @AndrewT. Fixing code formatting (e.g. original asker didn't use code formatting at all for a huge code block; edit introduces code formatting) is also totally legit as an edit suggestion.
    – Mark Amery
    Commented Jan 15, 2019 at 13:08
  • @MarkAmery also, one thing I've found is a lot of users can't figure out SO's code blocks / syntax highlighting for some reason (really wish SO had good triple backticks support); I've seen a ton of messed up posts, so I'd recommend allowing suggested edits to fix that or lowering the rep limit for direct editing... or maybe just autoconvert old posts to community wiki?
    – jrh
    Commented Jan 15, 2019 at 13:14
  • 11
    "Reject all edits which only attempt to improve formatting." That is one of the most ridiculous things I have ever read. Even more ridiculous is the idea that the reputation of the user should make any difference in whether an edit is considered good or bad. Seriously, what in the heck happened to, "judge the content, not the user"?
    – jpmc26
    Commented Jan 16, 2019 at 5:19
  • 4
    Since when do formatting improvements “not really improve anything”? If you mean failed attempts at improvements, well, yeah, reject those. Nothing to do with being a formatting vs. content edit.
    – Ry- Mod
    Commented Jan 17, 2019 at 4:09

You must log in to answer this question.

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