Commit graph

12 commits

Author SHA1 Message Date
Kunal Mehta f2a516582d build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.FunctionComment.Missing.Protected
* MediaWiki.FunctionComment.Missing.Public

Change-Id: I96e32df48d13040893bfd1be6d90d0db4f7c7d0a
2017-06-20 00:10:41 -07:00
Subramanya Sastry 0f3c66418a Organize lint categories by priority
Displaying categories by priority provides editors with better
guidance about what to spend time on. The Linter help page provides
more information about why the specific priorities have been chosen.

Change-Id: If6f28570189e24a67b4380f666f4cd64a2296989
2017-04-28 10:42:47 -05:00
Kunal Mehta 9c65d786e2 Support new wikitext editor for edit helper
Register a hook for when VE is finished initializing to select the error
section, just like the textbox-based editor.

Use the BeforePageDisplay hook so it runs on VE page loads too.

Bug: T160102
Change-Id: I59a7e0a3e8be32e4689cbf41c4904970902c4dff
2017-04-25 15:21:13 +01:00
Legoktm 379137df59 Revert "Expose category totals in API response"
API meta=siteinfo is a frequently called API query
and the category totals database query is not
sufficiently fast enough to be part of this by default.

This reverts commit 45b4bf6382.

Change-Id: Ia5bf97855d48955ce53c3679c4d138fabafae8b7
2017-04-16 07:36:32 +00:00
Kunal Mehta 45b4bf6382 Expose category totals in API response
Instead of just including the error category names, include the number
of errors each category has, to make it easier to collect aggregate
stats.

This changes the structure from an array to an object, in JSON, but I'm
not aware of any clients using these specific fields yet.

Change-Id: Iaf942b923a0f4047721055ad9cb48aacc5aa6784
2017-03-20 14:14:22 -07:00
Kunal Mehta 5c606fca03 Display count of lint errors on ?action=info
Change-Id: Ifcdfcb365e5ff6106b521d58a06df8c006772473
2017-01-20 11:26:44 -08:00
Kunal Mehta 8b8c50e9d8 Add Linter categories to action=query&meta=siteinfo
Bug: T153056
Change-Id: Ieed01741d31c9e268a8769a5bc5d566d8020e760
2017-01-20 11:26:21 -08:00
Kunal Mehta b201a3122c Add __METHOD__ to MWCallableUpdate
For stats and debugging purposes.

Change-Id: I5acd7fad0a9f09519595c2fa1f6232bb2624a713
2016-12-14 19:46:18 -08:00
Kunal Mehta 70cc3ac190 Delete linter rows when pages are deleted
Bug: T151281
Change-Id: I3b113d0729b288683d9bc6c2f552b99ed2890f5c
2016-11-22 18:31:21 -08:00
Kunal Mehta b41e74ce8b Hardcode category ids
Instead of having a complex auto-increment category manager that had
additional caching, just hardcode the (currently 6) ids for each
category, which allows us to simplify a lot of code.

If Parsoid sends a lint error in a category that we don't know about, it
is silently dropped.

Bug: T151287
Change-Id: Ice6edf1b7985390aa0c1c410d357bc565bb69108
2016-11-22 18:31:17 -08:00
Kunal Mehta ec6f4722aa Store linter_cat names in a separate table
linter_cat is now an int ID that points to a row in the new
lint_categories table.

The mapping between category names and ids is all handled in PHP, and
cached in APC.

Note that you will need to drop the `linter` table manually and re-run
update.php for this to take effect.

Change-Id: I369d9b4d8d08289b4a20d1cd29a2e327bad28ef8
2016-11-03 14:51:10 -07:00
Kunal Mehta bce5b31616 Initial commit
This configures a MediaWiki extension to recieve Parsoid's lint errors
and expose them to users.

Change-Id: Ie0776aecf145eb1c87c2a539ddf3ea8d35a899f5
2016-10-17 16:02:53 -07:00