Commit graph

1241 commits

Author SHA1 Message Date
Translation updater bot 22baa7612c Localisation updates from https://translatewiki.net.
Change-Id: If93853d311b0e4803666a144c6132ed2f845b0f1
2017-02-17 22:38:36 +01:00
Translation updater bot 00bbf25963 Localisation updates from https://translatewiki.net.
Change-Id: I107d5de6b632a7a1ee304b03a01c63de597a7f07
2017-01-29 22:22:20 +01:00
Translation updater bot 0b57945954 Localisation updates from https://translatewiki.net.
Change-Id: I87ed7cbce5b052e92da06a01dc18d0cd37d97a13
2017-01-28 22:40:59 +01:00
Translation updater bot 2826588c68 Localisation updates from https://translatewiki.net.
Change-Id: I88757cc06d4a04d68f0c308ff31319bfd644d922
2017-01-27 14:43:08 +01:00
jenkins-bot c0d37c3c69 Merge "Display count of lint errors on ?action=info" 2017-01-25 18:47:29 +00:00
jenkins-bot 461e9edd05 Merge "Add Linter categories to action=query&meta=siteinfo" 2017-01-24 05:31:15 +00:00
Translation updater bot 58e7e246c5 Localisation updates from https://translatewiki.net.
Change-Id: I9cc05fd7e4e006cde08a511f689d2d35b5f3f850
2017-01-23 22:34:37 +01: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
Translation updater bot 154c3816e3 Localisation updates from https://translatewiki.net.
Change-Id: Ia03e833c353c48dcdaf0cd33fbd58b7133370797
2017-01-11 23:15:54 +01:00
Translation updater bot dad9b1da1a Localisation updates from https://translatewiki.net.
Change-Id: Iac3239d80c74df475f3daeb5ef98ec09de910086
2017-01-09 15:52:14 +01:00
Translation updater bot 5abfb06577 Localisation updates from https://translatewiki.net.
Change-Id: I17536b780563e07b61c2e9be06e50fa2b8d70ac0
2017-01-01 10:01:48 +01:00
Translation updater bot 2100f52998 Localisation updates from https://translatewiki.net.
Change-Id: I7435d419c3bfed1665118658e7af44e834da24ce
2016-12-26 22:39:11 +01:00
Translation updater bot b4296e99c2 Localisation updates from https://translatewiki.net.
Change-Id: Iae2491d90ec948fb91f772e51dafdfd70dbdbdcb
2016-12-23 22:31:27 +01:00
Translation updater bot 8e9e01608d Localisation updates from https://translatewiki.net.
Change-Id: I4bcf8d126dcd0ef8ee111f065ca7104a4210c87f
2016-12-22 22:54:23 +01:00
jenkins-bot 7b093c7827 Merge "Add __METHOD__ to MWCallableUpdate" 2016-12-20 01:14:40 +00:00
jenkins-bot 2f179e3851 Merge "Add severity for error categories" 2016-12-20 01:11:13 +00:00
Translation updater bot 31c5953ea1 Localisation updates from https://translatewiki.net.
Change-Id: I347c44b3b76434a48dcb85252cec58fb8cfaf6fe
2016-12-19 22:46:06 +01:00
Translation updater bot 5a01511443 Localisation updates from https://translatewiki.net.
Change-Id: Ifac80c16c783610f14b8660d3e27455934b554a7
2016-12-18 22:15:46 +01:00
Translation updater bot cbc3b9005c Localisation updates from https://translatewiki.net.
Change-Id: I872d2b62b1c5ed4b8dfed646acd93b2887f96f63
2016-12-16 22:15:30 +01: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 f3778856f2 Add severity for error categories
Categories can now have a severity level of "error" or "warning"
designated, which places them in a different heading on
Special:LintErrors.

Bug: T152822
Change-Id: I1276b9502d90765e88dcb8ea78569dee910c5d88
2016-12-14 17:07:40 -08:00
jenkins-bot 69fd50c811 Merge "Record totals in categories in statsd" 2016-12-15 00:03:42 +00:00
Translation updater bot 3ae0ff7c29 Localisation updates from https://translatewiki.net.
Change-Id: I61769ce3d3960e4efe1379ed2458ab3e50e291b2
2016-12-14 22:24:20 +01:00
jenkins-bot 06ece970b1 Merge "Add missing semicolon to &mdash" 2016-12-14 16:59:27 +00:00
Kunal Mehta 651d8f174b Add missing semicolon to &mdash
Change-Id: If669c89cd06ca173c0dcf6a01a793ddf8ce31793
2016-12-14 01:01:57 -08:00
Translation updater bot 152546d274 Localisation updates from https://translatewiki.net.
Change-Id: Iba1733ad1b050716f0c93d9592d7e3bc4b9a9e35
2016-12-13 22:43:25 +01:00
Translation updater bot 4dcbc5b639 Localisation updates from https://translatewiki.net.
Change-Id: Ie5cdfb74e69456f1e911e7890abf4637aa170fbf
2016-12-12 22:30:34 +01:00
Kunal Mehta 9ba2839e7d Record totals in categories in statsd
For historical purposes so we can see new errors being added/fixed.

Bug: T152664
Change-Id: Icec62d236351e43ec397ac448805ab16131c943c
2016-12-08 16:52:52 -08:00
Kunal Mehta 782313088d Show error counts on Special:LintErrors
Change-Id: Ib49f2e391ca4b9d1eef5443c011d54a42921ce4e
2016-12-08 16:52:31 -08:00
Translation updater bot ca7a3e85c1 Localisation updates from https://translatewiki.net.
Change-Id: Ib5d48d20a2d5c02df1a42e45d6724a531a1fb450
2016-12-06 22:44:49 +01:00
Kunal Mehta df0f222fa3 Remove redundant index
Because linter_cat is the leftmost part of the linter_cat_page_position
index, we don't need a separate one.

Pointed out by jynus in T148866#2846381.

Change-Id: I3b0e75b02762cc948baf8dbdfee67b611aa3b9c1
2016-12-05 19:40:27 -08:00
Kunal Mehta 08b4c26b7d Add unit tests for LintError
Change-Id: I62ac7c2d652afb7a46e912ad6178ebeb3cff3ff2
2016-12-02 16:27:48 -08:00
Kunal Mehta 81ef6878af Include location in LintError::id()
Since it's no longer in $this->params, we need to explicitly include it.

Change-Id: I45f26db061f02066aa03a501dc022bf33e2c096e
2016-12-02 16:15:17 -08:00
Kunal Mehta 8e2d4e42ee Use INSERT IGNORE when putting new lint errors in the database
The most likely scenario of duplicate key errors is that it's the exact
same lint error and there's just a race condition when calculating which
new errors need to be inserted, so just ignore them.

Follows-up 419610bcdb.

Change-Id: I84749ab221bbd517b474be8875bb6a59e4f3258e
2016-12-02 15:54:02 -08:00
Kunal Mehta fa56bafacf Add basic integration tests for RecordLintJob
Change-Id: I6852d41f481282750b690b2e8122dcb224b4a107
2016-12-02 08:11:16 -08:00
Kunal Mehta a50398d4ce Remove unused LintError::equals()
Change-Id: I0d0d743119fee8a95627c365e1b2f45b8fcf67e7
2016-12-02 07:56:19 -08:00
Kunal Mehta 3a03781a70 Add basic integration tests for Special:LintErrors
Change-Id: I2d527ae6f4f615e73ea5dafa21ba678c1de835f7
2016-12-02 07:55:26 -08:00
Kunal Mehta 9d5759329f Add alias file
So people can localize the special page name

Change-Id: Icd331d02f400dfca465236bb95c1357c58480260
2016-12-02 07:55:13 -08:00
Kunal Mehta 14b53d6281 Add integration tests for Database class
These tests insert variations of fake lint errors into the database, and
then read out of the database to check they round-trip properly.

And while we're at it, improve the setForPage() return value.

These tests can be run with something like:
 php tests/phpunit/phpunit.php extensions/Linter/tests/phpunit/

Change-Id: Ifdba8a8a104d218a822f909bc5d7b3512aca499d
2016-11-30 21:17:51 -08:00
Kunal Mehta 419610bcdb Enforce category/page/position uniqueness constraint in the database
Move location to two separate columns in the database: linter_start and
linter_end. This allows us to have the database enforce the uniqueness
of those fields, instead of just relying upon the PHP code to do so,
which could be bypassed since we have multiple servers and concurrent
processes.

Change-Id: I3e67ce1b7cb3c93866a388ec3248af4cff2a81e0
2016-11-30 18:55:19 -08:00
Kunal Mehta 9550db450d Fix inserting errors if none exist for that page
If no errors existed for the page, inserting new ones would fail with a
database error since $errors was key-ed by unique id, which the database
wrapper interpreted as field names, causing issues. Using array_values()
gets rid of the keys, fixing the issue.

Change-Id: I7645de4e5d3ac4462d7980374c8ef8be6280442b
2016-11-30 18:17:36 -08:00
Translation updater bot 65cdec486c Localisation updates from https://translatewiki.net.
Change-Id: Idc28e0c6c5380c3bd421036d16574c85becd8da8
2016-11-27 22:29:17 +01:00
Translation updater bot ad6efbb7b1 Localisation updates from https://translatewiki.net.
Change-Id: Ie2bcb5ff42bb1947966a30e265d87824831d497d
2016-11-25 22:51:26 +01:00
Translation updater bot 8756b0d573 Localisation updates from https://translatewiki.net.
Change-Id: I3a1690d156832b4b8629b6ac97b0948d0271bb9c
2016-11-24 22:20:23 +01:00
jenkins-bot 603f480f5b Merge "De-duplicate errors and trim excessive errors in the same category" 2016-11-24 14:56:49 +00:00
Kunal Mehta 29379edb0b De-duplicate errors and trim excessive errors in the same category
It's possible to have duplicate, identical lint errors if the same exact
error is repeated in a template transclusion (e.g. {{1x|<b/> <b/>}})
since the position via dsr is the same. In this case, just de-duplicate
the errors since we can't differentiate them.

At the same time, trim excessive errors on the same page in the same
category. It's most likely that if a page has that many of the same
errors, the editor or bot will just fix all of them at the same time, so
we don't need to include all of them in the database. 20 is kind of a
low value, but we can always increase it later on as necessary.

Change-Id: I9cded720169870d0eea574e1a930ce4e9b190ac0
2016-11-23 19:47:04 -08:00
jenkins-bot eb8981bd79 Merge "Delete linter rows when pages are deleted" 2016-11-23 23:58:31 +00:00
Translation updater bot 66c9a0ca2c Localisation updates from https://translatewiki.net.
Change-Id: I3784c6c60a22796ab73ed05b78c58e26f56e7c46
2016-11-23 22:37:53 +01:00
jenkins-bot 5db0873adc Merge "API: Fix lntcategories parameter" 2016-11-23 02:41:52 +00:00