Commit graph

54 commits

Author SHA1 Message Date
Moh'd Khier Abualruz b9f1d478e2 Unclosed tags in article headings
- divide the 'missing-end-tag' into 2 categories:
 * 'missing-end-tag': kept the same ( minus the new category results)
 * 'missing-end-tag-in-heading': high priority

depends-on: I8397a24e85ca9f5a9ce6413dec5efa8c401a9960

Bug: T308398
Change-Id: I5738abd522bf5248e4b7b1255920055182e6261f
2023-05-05 12:57:21 +02:00
Moh'd Khier Abualruz 53918dd364 Create linting rule for large tables
depends-on: Ic25c50caf15423179e32ab1b4c0f0ab9f6c71cb3

Bug: T334528
Change-Id: I691a265aa1c3914c8cd9f3a63c2e8f8bfe92af0f
2023-05-02 19:21:10 +02:00
sbailey 6aa4cdeba9 Linter Tag and Template search feature, UI and report code
* Tag and Template search is enabled using config variable
   'LinterUserInterfaceTagAndTemplateStage' and also checks for
   the linter table column 'linter_tag' to exist to protect the
   report code from error if the column is absent. As the linter
   table alter maintenance added both the linter_tag and
   linter_template at the same time, there is no reason to check
   both. The user interface code does not check for the field
   presence only the config variable.

 * This code depends on the recordLintJob code writing the tag
   and template data which is enabled by the config variable
   'LinterWriteTagAndTemplateColumnsStage' and also assumes the
   data migration maintenance script migrateTagTemplate.php has
   been run to populate linter error records created prior to
   the table alter and the write code being enabled.

Bug: T175177
Change-Id: I2f951dfcd34e3dc6ca17e8754cfaeba8baa3e835
2023-02-27 06:55:06 -08:00
Kunal Mehta cb84f3a872 Link to detailed Special:LintErrors from action=info
action=info has a summary table of number of lint errors by category,
but we have richer information available via Special:LintErrors. If
there is a "Lint errors" section, provide a link below the table to
Special:LintErrors for the errors on this page.

Update ApiRecordLint for the new Hooks constructor and leave a FIXME
to eliminate the coupling.

Bug: T301374
Change-Id: Ic1fcf42b50d1392ac53201ceb256691133cf62ff
2023-02-06 20:41:45 -05:00
sbailey 79e825a466 Provide search by title prefix for any category of lint error
Bug: T185685
Change-Id: Ib667fcf5b2b1e752fde297b32b8bbe37dceabc5a
2022-06-16 13:27:14 -07:00
Arlo Breault b89ba6d2fe Revert "Add linter category for "inline-media-caption""
This reverts commit e8a1b8218c.

The category was left around in extension.json, as disabled, since it's
already associated a dbid.

Also, deleted the page [[:mw:Help:Lint errors/inline-media-caption]]

Bug: T297443
Change-Id: I5fd80a7da428db7c022cbbf3cca4a317556c528b
2022-05-11 14:57:24 -04:00
sbailey 7309cc139c Linter allows specification of a page prefix to refine selection
* UI and functionality working, SQL injection risk is handled using
   the database wrapper function buildLike()

Bug: T185685
Change-Id: I1f630a83f01a1c93f29643e4fc8baf55391b758d
2022-03-10 08:48:19 -08:00
Arlo Breault 8a797fd625 s/linter-pager-title/linter-pager-title-header/
Change-Id: I51e4ffa89954b0b6bf798562668dc4a95c00d9da
2022-01-11 23:24:52 +00:00
Arlo Breault ace2d5c17d s/linter-pager-template/linter-pager-template-header/
Change-Id: I658b258fe46bdeefbfc0b1d348e4ac4d9c423205
2022-01-11 12:41:56 -05:00
Arlo Breault 850ec4fa70 Add i18n for pager category
Follow up to I70fde2676ded6a112f7f2b07f94f6f4b616f0e39

Change-Id: I38647833938fb27793827649bc5c785dc3fd63ea
2022-01-11 12:21:19 -05:00
sbailey 31bc33b578 All lint errors for a single page was missing error detail label
Bug: T151362
Change-Id: I4eabb53cd133ee46e986a0d81a7002a286dfc0c4
2022-01-10 13:07:31 -06:00
sbailey 88aab3cd1e Linter: Display lint errors for a single page
* Added error message when namespace and/or pagename is not
  found or malformed which now displays a bold red message.

Bug: T151362
Change-Id: I70fde2676ded6a112f7f2b07f94f6f4b616f0e39
2022-01-07 12:45:55 -08:00
Arlo Breault e8a1b8218c Add linter category for "inline-media-caption"
Bug: T297443
Depends-On: I4cdbfe46bce7556d2187a5f1c908b3538d1185fb
Change-Id: I83d51c40b3c4c1f3e5de327aba6f05e65d9814c7
2021-12-15 17:27:52 -05:00
jenkins-bot 2ee5677752 Merge "Consistent spelling of "color"" 2020-02-16 04:14:05 +00:00
Amir Aharoni df28ee8d4b Consistent spelling of "color"
Change-Id: I9eba5c19c396f1b5e02915c489d3674f192dabe7
2020-02-12 13:33:58 +02:00
Amir Aharoni ff0fea34bf Rephrase a message
The word "previously" was used quite unclearly.

Change-Id: I65a4388075748a8d2e09fab20e0d512d859ffa9f
2020-02-12 13:32:29 +02:00
James D. Forrester 0397f71b96 i18n: Re-word to not say 'Tidy' at people, or suggest changes are in the future
Change-Id: I8b7681f740d7ef30914e0cf61605c0194ec1bdc4
2020-02-11 13:15:56 -08:00
James D. Forrester 274c6a344c i18n: Sort en.json and qqq.json for consistency of next diff
Change-Id: I241d2860089db1f1cd0efb3d16f3ea4f113ea196
2020-02-11 13:15:56 -08:00
Amir Aharoni 243604ffc6 Split apihelp messages to a separate file
Bug: T189982
Change-Id: Ie06eb176da9257816057d2a9af2a793dfe169689
2019-07-04 15:38:00 +03:00
Gueleu a6935d5230 Remove Column 'Nested wikilinks in external links that need to be fixed'
The column is not being used

Change-Id: I5fdc827994475eddd550170579bca5cfcd0a08fb
2019-03-27 08:46:33 -07:00
SFarida 0f37222bbb Add new Linter category wikilink-in-extlink
Add the category in extension.json and descriptions
of the category in qqq.json and en.json

Bug: T202905
Change-Id: Ie2e76c653ac9aa80bc7c32f3227323225a0cd8e5
2019-02-19 10:53:43 -08:00
MarcoAurelio 97261b6feb Use bold on linterrors-summary instead of all caps
Change-Id: I83cafe889da4fd625f691612bb3fb8904a890be8
2018-07-17 18:24:16 +00:00
Guycn2 474457abaa Add a period at the end of the sentence
Change-Id: Ic7ac3f1ced7cca6095bd72d0e3635f6887a1f487
2018-04-03 22:29:25 +00:00
Subramanya Sastry f0d8e13d5f Add linterror-summary i18n message
Change-Id: I4461a05dd92d11b570af230cb43542947b2cf9dc
2018-03-15 15:52:35 -05:00
Subramanya Sastry b98e04e065 Update en/i18n message for multiple-unclosed-formatting-tags
* Looks like I missed other instances :(

Change-Id: If28d3127ca93af575d8b7c2b8e1539efde0639c2
2017-12-13 17:29:18 -06:00
Subramanya Sastry b416e84f80 Update en/i18n message for multiple-unclosed-formatting-tags
* On the Parsoid side, we update the use of this linter category
  for more than small and big tags.

Change-Id: I55ac9e3cc16135ac4e353a03d4d9223a599b58b8
2017-12-11 17:04:11 -06:00
C. Scott Ananian c0ad96898d Add 4 new high priority linter categories
* multiple-unclosed-formatting-tags: this is a subset of the unclosed
  formatting tag lint, but is higher priority because unclosed tags
  like <small> and <big> compound their effects

* unclosed-quotes-in-heading: unclosed wikitext i/b tag with a heading
  ancestor (this causes breakage which leaks out of the table of
  content to affect the rest of the page)

* multiline-html-table-in-list: html table with newline breaks nested
  in a list

* misc-tidy-replacement-issues: this is a catchall category for
  infrequent long-tail issues, used to enable speedy deployment of new
  linter categories during tidy replacement as wikis get RemexHtml
  enabled.  These will have a subtype property to identify the
  specific issue.

Change-Id: Ic2c965132f7a09679574489865bdc81df9e43845
2017-12-08 06:39:16 +00:00
Haikal Izzuddin 94fa73ac1b Replace deprecated usage of ApiBase::dieUsage()
Linter calls the deprecated ApiBase::dieUsage() function in
ApiRecordLint.php, replacing it with dieWithError().

Bug: T181758
Change-Id: I0cbf784f591b86b206b032fccbc0e32564a3e9e8
2017-12-03 15:26:39 -08:00
jenkins-bot ad6af1133b Merge "Rename typo "linker-" keys to proper "linter-"" 2017-11-25 16:41:25 +00:00
jenkins-bot 44aa608aae Merge "Show edit and history links even if page is protected" 2017-11-25 13:56:52 +00:00
xyx_is a262956017 API: Allow querying linterrors by pageid
The pageid parameter limits lint errors to specific pages. Users can get
detailed lint error information of a certain page.

Bug: T181303
Change-Id: I164449254649caff29fcffa3bc7c923c20b8e837
2017-11-24 21:03:05 -08:00
Kunal Mehta 35cfda325b Rename typo "linker-" keys to proper "linter-"
I must have made a typo and prefixed the keys with "linker-" instead of
"linter-".

Change-Id: I041aa3341aaa2efa51d20c848cb19efb648209ac
2017-11-24 20:38:25 -08:00
Kunal Mehta e0ac4c6e6b Show edit and history links even if page is protected
If the user does not have permission to edit the page, still show a
"view source" and history link so they are able to figure out what the
error is.

Bug: T177289
Change-Id: I049d27d37073e452dc0c11128dab5204d110d81f
2017-11-24 20:35:15 -08:00
Subramanya Sastry 95f4038db8 Add tidy-font-bug linter high-priority category
* <font> tags with color attribute that wrap links and images
  will have different behavior and hence rendering compared to Tidy.

Change-Id: I7a551ef9b7e8f57d7a43c823832f0e3add6b1367
2017-10-23 17:08:57 -05:00
Subramanya Sastry 110121680a Fix incorrect message
Bug: T177286
Change-Id: I26d549e7185be7dad7e451f9545b56d2e5556b61
2017-10-03 09:25:18 -05:00
Subramanya Sastry d13bb1aa6c Add html5-misnesting high-priority category
Change-Id: I840c4dfc14308dffd02dd8a89ab4dcac13f6141a
2017-09-26 12:31:43 -05:00
Arlo Breault 875e0f84a0 Add multi-colon-escape linter medium-priority category
Change-Id: I9f21f3128b78e7b2459c18a9121605dffd5a1bc4
2017-09-18 14:04:04 -04:00
Subramanya Sastry ce8b7c873c Add tidy-whitespace-bug linter high-priority category
Change-Id: I9c068c2c45b4cf9bb5612f41dfa63a606a7a679a
2017-08-10 12:20:09 -04:00
Brad Jorsch 7b170ca644 API: Split description messages into summary + additional text
See MediaWiki core patch I778bab2b

Change-Id: I7b3abe12102fb3ef25953f6b92cd9c8047f8dfe4
2017-06-13 13:27:49 -04:00
jenkins-bot 2a242f9fce Merge "Add API meta=linterstats module" 2017-06-06 17:26:01 +00:00
Kunal Mehta 35a2ba9a6c Add API meta=linterstats module
This module just exposes the number of lint errors in each category for
tools that want to collect statistics and stuff. It's currently under a
'totals' key to give us more flexibility if we want to add other
information in the future.

Change-Id: Iad5136a6a5989ce5bcb1a00a4f82f49a397e0170
2017-06-06 10:02:49 -07:00
Subramanya Sastry 3eea8ed824 Handle multi-part-template-block output from Parsoid's linter
The messaging is a bit tricky. In some cases, the flag is set
because the output involves a single template and some top-level
content -- not multiple templates always.

Ex: '{{1x|<div>}}foo</span>'

In this case, the entire content is considered template-affected
because of DOM structuring reasons. This wikitext will generate
lint errors with multi-part-template-block template info.

In production usage, however, the probability is quite high that
multiple templates will be involved. This is usually because of
tables that are constructed with multiple templates, for example.

So, if we want to fudge and hand-wave a bit, the i18n message can
say that the output came from multiple templates.

Bug: T162920
Change-Id: I35cee6787800b03724856775fdf53991ae8e8125
2017-05-08 23:01:32 -05: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
Subramanya Sastry a866fa7c76 Add pwrap-bug-workaround linter category
Change-Id: If1ec022e5bb741f4dc825428b5a689c2f0b0c445
2017-04-19 15:19:13 -05:00
Kunal Mehta fbff1cffff Add namespace filter to Special:LintErrors
Bug: T162918
Change-Id: Id41faeafb9af161d32d5c273094fb2e6d8a8a64b
2017-04-13 20:49:21 -07:00
Subramanya Sastry 0d230e722f Add misnested-tag linter category
Change-Id: I3508c68272940d21be6a5c9b78ee34c845debc74
2017-04-10 17:28:36 -05:00
Subramanya Sastry 619ddc8677 Add deletable-table-tag linter category
Change-Id: I48000170a74363872edbce8f78780bccf160600c
2017-04-06 12:47:51 -05:00
Kunal Mehta 7f17abe393 Add link to history on Special:LintErrors
Bug: T160607
Change-Id: Ifd2ef33dd7477722691c8f2e570b7ac1af206135
2017-03-22 13:28:33 -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 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