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 aove.

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.