Board Thread:General Discussion/@comment-24531999-20160514180240/@comment-24473195-20160524144232

Rappy 4187 wrote: Dessamator wrote: Exactly, and for that reason there isn't any point in reviewing code with fatal errors that won't even work at all. Even if the reviewer allows it, MediaWiki will certainly block or ignore the script (which might result in a complaint in the forums or to support). It is incredibly simple to reject these automatically. I'm not sure what you mean here. 9/10 the broken code is dependent on an element that is missing from the page. The code in and of itself is legit with no errors. Take this for instance. I meant code with fatal syntax errors, e.g. unmatched brackets, e.g.:

or

I think these links (patch and task) explain it rather well:


 * https://phabricator.wikimedia.org/T76204
 * https://gerrit.wikimedia.org/r/#/c/176853/

To put it simply, don't allow storage (or submission for review) of invalid javascript. If not everywhere at least not in the mediawiki namespace. At least shout loudly, add to a tracking category or something.

I've seen dozens if not hundreds of threads in community central caused by user ignorance. People enabling, importing, relying on scripts that will never work.

In fact, I think the latest mediawiki disallows lua modules with invalid syntax by default. It doesn't even have the checkbox anymore.