Page MenuHomePhabricator

Allow registration of hidden lint rules
Open, MediumPublicFeature

Description

Feature summary (what you would like to be able to do and where):

Web team would like to add lint rules to the software for detecting known problematic states. However given that we've diagnosed a problem without a solution we want to be able to identify impacted pages without disrupting editor workflows.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

  • For those who know the special URL these could be shared and discussed using https://en.wikipedia.org/wiki/Special:LintErrors/hidden-tag
  • The hidden-tag lint rule should not show up on the main special page (Special:LintErrors)
  • It should be possible to define a lint rule to be hidden in the way described above.
  • Hidden lint rules should not be appear in the LintHint tool.
  • Hidden lint rules should not appear in the Linter section of the Page information page
  • Should be able to omit lint from hidden categories in the search results
  • Should be able to omit hidden categories from Quarry queries, without enumerating all the hidden categories
    • This probably means moving the LinterCategories from the extension.json to a table in the database.

Benefits (why should this be implemented?):

  • Allows us to add lint rules prior to subjecting the community to fix them, to aid discussions around what the correct fix should be and who's responsibility it is to fix it.

Event Timeline

I will look at this worthy request. It is easy to suppress a new category from being displayed in the Special:LintError page displaying all categories, but linter errors of the new category may still display using other search features. I will consult with folks further about how accessing these hidden lint rule "errors" should be handled, if they should be searchable using the search filter form, or only using a quarry database direct SQL query.

If this is implemented, the errors should also be hidden from the "Page information" page and from the page that results from clicking on "View detailed information on the lint errors".

Change 913944 had a related patch set uploaded (by Jdlrobson; author: Mabualruz):

[mediawiki/extensions/Linter@master] Create linting rule for large tables

https://gerrit.wikimedia.org/r/913944

Change 913944 merged by jenkins-bot:

[mediawiki/extensions/Linter@master] Allow registration of hidden lint rules

https://gerrit.wikimedia.org/r/913944

A better option may be to create a fourth Linter tracking group, below "Low priority", called "Tracking only" or something similar, to indicate that Linter is being (mis?)used to determine the extent of a condition, and that there is not necessarily a problem to be fixed.

Ideally, "Tracking only" flags could still be hidden from Page information, LintHint, and similar tools that count actual Linter problems.

Or, even more ideally, developers could use queries or reports rather than Linter for determining the extent of conditions that are not Linter-related errors. Just because a tool works for a task does not mean it should be used.

Arlolra triaged this task as Medium priority.Aug 23 2023, 7:57 PM
Arlolra moved this task from Backlog to Linter-UI on the MediaWiki-extensions-Linter board.
Jdlrobson updated the task description. (Show Details)

This feature request came up again in the context of T358238.

Change 1010626 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/core@master] Filter out all priority none lints from rest api

https://gerrit.wikimedia.org/r/1010626

Change 1010626 merged by jenkins-bot:

[mediawiki/core@master] Filter out all priority none lints from rest api

https://gerrit.wikimedia.org/r/1010626

Change 1011017 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/Linter@master] [WIP] Fix invisible categories in ApiQueryLintErrors

https://gerrit.wikimedia.org/r/1011017

Change #1011017 merged by jenkins-bot:

[mediawiki/extensions/Linter@master] Fix invisible categories in ApiQueryLintErrors

https://gerrit.wikimedia.org/r/1011017

Change #1016431 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/Linter@master] Don't include hidden category counts in page info

https://gerrit.wikimedia.org/r/1016431

Change #1017147 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/Linter@master] Stop exposing hidden categories in siteinfo

https://gerrit.wikimedia.org/r/1017147

Change #1016431 merged by jenkins-bot:

[mediawiki/extensions/Linter@master] Don't include hidden category counts in page info

https://gerrit.wikimedia.org/r/1016431

Change #1017147 merged by jenkins-bot:

[mediawiki/extensions/Linter@master] Stop exposing hidden categories in siteinfo

https://gerrit.wikimedia.org/r/1017147

Change #1021604 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/Linter@master] Omit lints in hidden categories from search results

https://gerrit.wikimedia.org/r/1021604

Change #1021605 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/Linter@master] Suppress hidden categories from subpage prefix searches

https://gerrit.wikimedia.org/r/1021605

Change #1021604 merged by jenkins-bot:

[mediawiki/extensions/Linter@master] Omit lints in hidden categories from search results

https://gerrit.wikimedia.org/r/1021604

Change #1021605 merged by jenkins-bot:

[mediawiki/extensions/Linter@master] Suppress hidden categories from subpage prefix searches

https://gerrit.wikimedia.org/r/1021605

@Jdlrobson Should this be verified in Prod and if so, how?

@GMikesell-WMF this can be ignored as part of web-team QA. My expectation is this is being handled by content transform team.