Setting expectations
It's important that new users understand as soon as possible that Stack Overflow won't write code for them, produce an individualized solution, guide them through every subsequent problem they encounter with the same task, etc. While the tone of "Stack Overflow is not X" isn't generally appropriate, canned comments need to reflect that mentality, and they must be firm in doing so.
Fundamentally, certain questions can't be rescued by editing them. If a question is far too broad, a duplicate, or caused by a typo, then edits that make the question suitable for Stack Overflow... would fundamentally create a different question. It's important to keep this in mind; canned comments must not falsely suggest that an unsalvageable question could be salvaged.
About close reasons
While the reasons to comment should of course be informed by whether the question is suitable for Stack Overflow (and therefore by the standard reasons for closing questions), there is not a one-to-one mapping onto things that new users need to be told about the question. There are many conceptual ways, for example, that a question could lack focus or clarity; and some bad question-asking habits could prompt multiple closure reasons.
About "minor edits"
I touched on this in a comment. "minor" vs. "major" is the wrong distinction here. The real axis of concern is "can be fixed by others" vs. "requires OP's input". If the problems can be fixed by others, then they should be fixed by others, unless OP volunteers. It will be much faster and more streamlined that way, trust me.
However, it will be useful to explain such edits after the fact to OP via canned comments, so that they can improve their posting style and avoid the need for such edits on future questions.
Tailoring
Many things that one might say to a new user, in order to be useful, need to be adapted to refer to specific details of the question. Which is to say, I sympathize with CodeCaster's view; but canned comments still provide a highly useful framework for identifying issues with a question (and reminding oneself of the list of potential issues), and for making it easier to adhere to the Code of Conduct while frustration mounts from repeatedly saying the same things to multiple new users. It also potentially saves a lot of time - both typing, and thinking about the phrasing.
My proposals
With that in mind, here are some canned comments I propose for a mixed bag of circumstances:
Issues requiring OP's input
Issue |
Message |
Question is not in English (Ideally, there would also be official translations of this message to commonly spoken languages, with direct links to the localized sites where applicable.) |
Welcome to Stack Overflow. Questions here [must be asked in **English only**](https://stackoverflow.com/help/non-english-questions). We [will not translate](//meta.stackoverflow.com/q/297673) the question for you, because we must be sure of your meaning, in your own words. If you can, please [edit] to ask in English instead. The title for your question must also be in English. |
Question is a clear duplicate, at most minimal explanation required |
Welcome to Stack Overflow. The key issue here is <explain briefly>, and this is a common problem. We already have a Q&A about this at [title of page](//stackoverflow.com/q/<id>) - please read it to understand the problem thoroughly. If you have a new, related question after that, please start over and ask it. If the Q&A doesn't help, please see [this post on our Meta site](//meta.stackoverflow.com/q/252252). |
Question is potentially a duplicate |
Welcome to Stack Overflow. It looks like the key issue here is <explain briefly>, in which case we already have a Q&A about it at [title of page](//stackoverflow.com/q/<id>). If that answers your question, great! We're happy to have helped. Otherwise, please [edit] the question to make it clear [how you think it's different](//meta.stackoverflow.com/q/252252). |
Question is copy-pasted from homework, interview test etc. |
Welcome to Stack Overflow. Please read [How do I ask and answer homework questions?](//meta.stackoverflow.com/q/334822/). We will not solve homework, job interview questions, problems from "puzzle" websites etc. for you - plagiarism is a serious matter. The Stack Overflow format requires a clear **question** that is about **one specific, clearly identified problem**; posts here are *not* simply about getting a piece of code to work. Please study the task on your own first; if you find a question about one specific problem, then start over with a question about that. |
The code clearly works and there is no objective question |
Welcome to Stack Overflow. We don't discuss code here or offer arbitrary suggestions for improvement; this is a **question and answer site** as described on the [tour], which means we need a **specific, objective question** to answer - e.g. "can I make this a one-liner"; "can this be made to run faster/use less memory"; etc. If you want to ask a question like that, please [edit] to do so. If you are looking for a code review, please try [codereview.se] instead. |
The question is confused between "how do I do X" and "what's wrong with code Y" |
Welcome to Stack Overflow. It looks like you've already tried to complete the task yourself before posting. That's good in general, but right now it means there are really two questions here: one about <problem as described>, and one about <task as described>. We require **one** question per post here, so please choose which one you want to ask, and [edit] accordingly. It could turn out that the right way to solve the problem uses completely different code. |
The (how-to) question lacks a clear specification |
Welcome to Stack Overflow. It's hard to understand what you want to happen when the code runs. For example, if I input <example>, should the result be <propose some possibilities, or directly ask what should happen>? Please **think about this carefully** instead of just answering me; then [edit] the question so that it's clear how the code should work in every case. |
The code appears to work and it's not clear what's being asked |
Welcome to Stack Overflow. When I try this code <insert background assumptions and input here>, it seems to work - I get <result>. If that's the wrong result, or there's something else you want to ask about, please [edit] to make it clearer. You may also be interested in [codereview.se]. |
There is not enough code for an MRE |
Welcome to Stack Overflow. It's hard to understand the question, because this code does not enable me to reproduce the problem. Please read [mre] and then [edit] the question to make sure that it showcases what is wrong - **try using the code yourself** from the question, instead of your original code. Ideally, we should be able to *copy and paste* the code *without adding or changing anything*, run it, and see the *exact problem, directly*. |
There is way too much code for an MRE |
Welcome to Stack Overflow. Please keep in mind that we don't write answers here to "find the bug" for you; we require a **specific** question about a problem that you have already [identified](//meta.stackoverflow.com/q/261592/) and [located](//ericlippert.com/2014/03/05) a specific problem. That is: make sure you have already figured out a **specific part** of the code that does something different from what you expect (and you should concretely *expect something*); then [edit] the question to include a [mre] and ask about the unexpected result. |
An error message is needed, but is missing or incomplete |
Welcome to Stack Overflow. In order to diagnose the problem properly, we need a [complete](//meta.stackoverflow.com/q/359146) error message that is **copied and pasted** (don't try to retype or describe it) - if at all possible, this should be [text, not an image](//meta.stackoverflow.com/q/285551). Please <environment or language-specific instructions>, then [edit] the question to include this information. |
Inappropriate use of images for code, errors etc. |
Welcome to Stack Overflow. **[Please do not use an image](//meta.stackoverflow.com/q/285551) to show us <description> - instead, *copy and paste the text*, with proper [formatting](https://stackoverflow.com/help/formatting). This will help us to write answers and do any needed additional research. We [will not transcribe](//meta.stackoverflow.com/q/415040) images for you. |
Severe formatting issues (not fixable by others) |
Welcome to Stack Overflow. Please read the [formatting help](//stackoverflow.com/help/formatting), and then [edit] your question so that everything shows up properly. If you need more help, [try looking on the Meta site](//meta.stackoverflow.com/search?q=is%3Aquestion+formatting+%5Bfaq%5D). I would fix it for you, but I wasn't sure how you intended it to look. |
Feedback for edits already made
Issue |
Message |
Fixable formatting issues If the change was minor and it seems likely that OP simply made a typo in the formatting, don't leave a comment. |
Welcome to Stack Overflow. We've edited your post so that it appears properly formatted: <describe specific issues, if appropriate>. Before your next question, please read the [formatting help](//stackoverflow.com/help/formatting) to see how to do it properly. If you need more help, [try looking on the Meta site](//meta.stackoverflow.com/search?q=is%3Aquestion+formatting+%5Bfaq%5D). |
Noise removed from the question: "please", "thank you", signatures etc. If multiple kinds of noise were removed, use your judgement or write a custom comment. |
Welcome to Stack Overflow. For future questions, please keep in mind that this is a **Q&A site, not** a discussion forum, help desk or anything else like that - because of that, we want question posts to contain [**only the question, not**](//meta.stackoverflow.com/q/328379/) <describe what was removed>. (We've already fixed this for you; you don't need to do anything and are not in trouble.) |
Noise removed from the question: "I'm a beginner" or other personal commentary |
Welcome to Stack Overflow. For future questions, please keep in mind that we want question posts here to contain [**only the question, not**](//meta.stackoverflow.com/q/328379/) anything to do with you, your level of skill as a programmer, or anything else like that. We will automatically adjust how we write answers, according to the complexity of the problem and who we think is likely to have the same issue. (We've already fixed this for you; you don't need to do anything and are not in trouble.) |
Noise removed from the question: commentary about urgency |
Welcome to Stack Overflow. For future questions, please keep in mind that questions posted here are for *everyone who has the same issue, not just you*; we [are not interested](//meta.stackoverflow.com/q/326569) in your personal deadlines and will volunteer answers on our own schedule. Some of the best answers on the site were written many years after the question was asked. (The question [has been edited](//meta.stackoverflow.com/q/328379/) to remove this commentary; you don't need to do anything and are not in trouble.) |
Noise removed from the question: meta commentary Hopefully, the Staging Ground will make this sort of problem much less common! |
Welcome to Stack Overflow. Please don't include anything in questions here that asks about the site's policy or which is "meta" - such content [will be - and has been in this case - promptly removed](//meta.stackoverflow.com/q/328379/). Instead, please use [the meta site](//meta.stackoverflow.com), after first reading the [guide to Meta](//meta.stackoverflow.com/q/259917) . |
Editing for clarity and/or focus |
Welcome to Stack Overflow. We've edited the question for you to make sure it's *clear* and *focused* enough for the site standards, by <give details>. Please have a look; if we misunderstood something, feel free to [edit] again and fix anything that's wrong. **Editing posts is a community effort**; questions here are for everyone, as described in the [tour], and we want them to be as high quality as possible. |
Copyediting, grammar fixes etc. |
Welcome to Stack Overflow. We've edited the question for you to make it clearer and easier to read, by <give details>. Please have a look; if we misunderstood something, feel free to [edit] again and fix it to make sure the question is accurate. **Editing posts is a community effort**; questions here are for everyone, as described in the [tour], and we want them to be as high quality as possible. |
OP is objecting to edits (especially noise edits) |
Welcome to Stack Overflow. Please keep in mind that when you post here, you [grant a license](//stackoverflow.com/help/licensing) to your content, to both the community and to the site itself, which **cannot be revoked**. We retain the right to edit questions [in accordance with policy](//meta.stackoverflow.com/q/328379/). Questions posted here are not like posts on a discussion forum; they are helping to build a searchable library for everyone, as described in the [tour]. |
Ideally, the system for canned comments will fill the text into a comment field, but not actually submit it; this way, we can do whatever customization is necessary first. Again, the goal is not to ensure that everyone communicates in this exact, rigid way; the goal is to save time by providing a useful framework for describing problems with questions.
[edit]
link shortcut. It will help people avoid using comments to clarify their questions.