Commit graph

64 commits

Author SHA1 Message Date
Arlo Breault 9bb5f7af97 Change capitalization of duplicate IDs
Bug: T200517
Change-Id: If7a15b5c6c7405465ab3197c9779fdc091d961ee
2024-09-26 19:47:12 -04:00
Arlo Breault 0dad8f46b0 Add a "duplicate-ids" lint category
Bug: T200517
Change-Id: Ifc3aeb167de8ef1c9a686919408d1d6fbd85c581
2024-09-17 19:43:44 -04:00
Arlo Breault 7847bbde58 Add a hyphen to rendering-transparent
Change-Id: Ifacd67304c429dae0bb4a552314dcbc4fd175a84
2024-07-29 17:38:30 -04:00
Arlo Breault fe6612e6ea Add a "fostered-transparent" lint category
Historically, Parsoid would suppress emitting lints for fostered content
that was purely rendering transparent since it's common to put include
directives, categories, etc in fosterable position and it made no
difference to rendering.

However, clients like DiscussionTools can benefit from this knowledge,
especially outside of templated content where it could result in edit
corruptions.

A separate category is used to avoid disrupting the work of editors
cleaning up lints in the "fostered" category, as in T369317.

Bug: T371142
Bug: T290936
Bug: T369317
Change-Id: I3519d86898df262eaea1a3303130453497ff27aa
2024-07-26 16:41:59 -04:00
Brooke Vibber ea186c1cee Add hidden lint missing-image-alt-text
Add support for new parsoid lint, missing-image-alt-text
Matches on images that don't have an alt text attribute at all
(empty alt attributes count as present).

Intended to make it easier to put workflows around these images,
including streamlined workflows for "microcontributions" in the
mobile apps.

As this has some impedence mismatch with usage of Special:LintErrors
this is marked as hidden (priority=none) so will not be displayed by
default, but has an enum value reserved for it and can be queried
explicitly.

Bug: T344378
Change-Id: I38cc1abbece3cca8155bec1f071b854027be0966
2024-05-29 19:03:41 -04:00
C. Scott Ananian a15cb4766f [i18n] Update missing linter-pager-*-details messages
Several linter categories were missing l10n strings for the
corresponding linter-pager-*-details message.  I also re-alphabetized
the keys.

Change-Id: Id61923e74de7e2b082b30b885dc32a47b5a29dc5
2024-03-29 18:14:00 -04:00
C. Scott Ananian 24ef2e9cdb Revert "Revert "Add inline background color""
This reverts commit e2c7746818.

Reason for revert: Culprit is actually on the Parsoid side (reporting a new linter type before the Linter extension knows about it, transiently during deploy) and this revert makes that problem worse not better.

Change-Id: Ib0c1fab8b8e9536e90591a58da673931f5bddf4c
2024-03-20 19:43:10 +00:00
Jdrewniak e2c7746818 Revert "Add inline background color"
This reverts commit d08fb459c0.

Reason for revert: Might have caused T360565

Change-Id: I408d6eeb2a2789a284d45f879c77ea1e9936ff7c
Bug: T360565
2024-03-20 19:18:54 +00:00
ksarabia d08fb459c0 Add inline background color
*This adds inline background color linter

Bug: T359205
Change-Id: Ic0a66bdd8ae784c8e048cdba60bcfa11e3f96d20
2024-03-07 17:55:07 +00:00
sbailey dd0836d232 Implement multiple namespace selection for Linter filters
* Using namespacesmultiselect type in HTMLForm element to
   provide multiple namespace selection criteria in reports.

 * New namespace URL encoding implemented which matches namespace
   parameters against active namespaces to ensure parameter
   security and validation.

 * Test system updated to use new URL namespace encoding

Bug: T231161
Change-Id: Ic3190cffe259aecdea429c10e35122eabdbe10d4
2023-10-26 10:39:57 -07:00
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