A very common comment on SO questions is the request for sample code.
The thing is that this is possible to detect "automatically": by checking if the user formatted anything as code. Of course you will be warned when you forget to format your code, but I think that's a nice side effect.
I really think this is also in the poster's best interest: a question that is correct from the start focuses the community on ansering it, rather than fixing the question.