24

When submitting a question, there is an automated check for code formatting. However, when failing the check the error only indicates that somewhere in the question an issue was detected; it does not spell out what the issue is or where it was detected. It would be great to have the problematic line/s highlighted and maybe even the types of format errors identified.

Could this feature be considered/implemented?

When I search on the formatting error messages, I find many people who share about hours wasted on trying to identify the formatting problem preventing them from submitting a question.

17
  • 2
    The problem is, question formatting doesn't "throw errors" - it just gives a wrong-looking result. And it's not a computer program's job to decide for you what the result should look like. Commented Feb 6 at 8:47
  • The only real formatting "regulation" that "throws an error" is essentially posting too much code. Is that what you are referring to?
    – Paulie_D
    Commented Feb 6 at 8:50
  • 2
    @Paulie_D No, not the error when posting too much code.
    – Craig
    Commented Feb 6 at 9:04
  • 2
    @KarlKnechtel It's definitely an error that is displayed on screen. Here's the link to where we engaged on the related post: meta.stackoverflow.com/questions/428004/…
    – Craig
    Commented Feb 6 at 9:07
  • 5
    @yivi See this question as example: meta.stackoverflow.com/questions/428004/… The error message is simply: "your post appears to contain code that is not properly formatted as code". I searched this error and found many people complaining of wasted time finding errors.
    – Craig
    Commented Feb 6 at 9:09
  • 1
    Not a lot of support to get this implemented on MSE nor MSO
    – rene
    Commented Feb 6 at 9:17
  • 7
    If anything, we need an faq for this as I don't expect the regex that does the checking to be changed or enhanced any time soon. Having an FAQ at least gives us a common place to document several known false positives, approaches to solve / find the offending line and a duplicate target for new posts.
    – rene
    Commented Feb 6 at 9:26
  • Do note that there are a handful of sites that have the check enabled: meta.stackexchange.com/a/387103
    – rene
    Commented Feb 6 at 9:57
  • "I find many people who share about hours wasted on trying to identify the formatting problem preventing them from submitting a question" - that's the end result of not properly informing yourself before you hit buttons I'm afraid, the effort you must do before ends up piling up at a later stage, with frustration and confusion added to it to slow down the capacity to figure it out.
    – Gimby
    Commented Feb 6 at 13:44
  • 4
    @Gimby That's the problem that Apple solved - being more user friendly. While others argued that it was "the users' fault". The guidelines clearly do not cover this adequately if so many people over a long period still have issues.
    – Craig
    Commented Feb 6 at 14:17
  • 10
    @Gimby the filter seems to produce false positives regularly, caused by url's, markdown issues, spelling, symbols in running text (like the use of # by the OP here). While some of those issues can be prevented by 'properly informing yourself' (such as how to use markdown headers correctly), others are not, and in all of these cases the system actively misleads the users in thinking that there is a problem with code which is simply false. You cannot prevent false positives, but showing the exact location where the regex found a problem would actually help users to properly inform themselves.
    – Marijn
    Commented Feb 6 at 14:52
  • 8
    You should at least get the sort of output you get from a modern compiler. None of the old Syntax error on line 10191 (in a 5-line program) <expletive deleted> I had to decode when I was a punk kid, but the sort of helpful Missing semicolon on or above line 13. We have the technology. We should use it. Commented Feb 6 at 20:09
  • @Marijn looks like it was the = sign, not the #
    – Phil
    Commented Feb 6 at 22:02
  • 1
    @Phil The last issue was the '=' symbol. Before that I had been fixing other potential issues which I thought were the problem - links, indenting (my default is 3, the format checker wanted 4). After spending more time than I should have my focus had waned.
    – Craig
    Commented Feb 6 at 22:49
  • 4
    @Craig full agreement, the site documentation sucks. And it is compounded by the fact that people do not look for it at all and just start hitting buttons. I mean this particular site feature is essentially dog water as you have experienced, it is hard to know what exactly it is throwing a temper tantrum over. But people who as a result are stuck for hours... do not know meta exists where they should be asking for assistance. If we're lucky they post something on the main site which then has to be migrated here, not an uncommon occurrence. People make it so much worse by just winging it.
    – Gimby
    Commented Feb 7 at 12:23

0

You must log in to answer this question.

Browse other questions tagged .