Use-case:
- Volunteer developers would like a tool that enables them to easily audit the code in gadgets and site-wide javascript (common.js / vector.js / monobook.js / mobile.js) (and perhaps also userscripts). This would enable them to focus their time on fixing deprecated or broken code, without having to spend many additional hours either manually testing gadgets, or looking through the raw code to try to identify errors.
Desired Outcome:
- provide some easy way to audit gadgets (or scripts in general).
- report the audit results to the wiki (either specific talkpage, or generalized specialpage, or even just a labs page that a bot could ping onwiki for updates)
This will help to avoid problems similar to the wikibits removal in April 2017, which led to widely unexpected problems, considering it followed a long deprecation period.
(Please edit this task description directly, to improve it, and clarify options. @Quiddity is not dev, and might have written inaccuracies!)
Notes:
(A) There's a bot at Commons that seems to do this User:CommonsMaintenanceBot - It makes edits like this example.
Bot Task description:
Watching recent changes of MediaWiki JavaScript pages, running JSHint over the old revision and the new revision, and generally notifying the editing user about issues, except they opted out; writing full report to a subpage of Commons User scripts (MediaWiki pages go to the message cache) and maintaining a table of scripts and their JSHint and esprima status (needs sysop flag for deleting obsolete error reports of scripts that are valid)
Programming language(s): JavaScript. Running on Node.js - source code available on GitHub (On labs: /data/project/commons-maintenance-bot/)
@Multichill notes: "Something like that, we just have to force it to fail on deprecation warnings"
(B) Also the Extension:Linter model,
where errors are listed at a special page, e.g. mw:Special:LintErrors
See also: T71519: Run automated browser tests across set of Wikimedia wiki pages to ensure proper JavaScript