Page MenuHomePhabricator

Suggestion: Linter: Query API parameter to limit by Page ID
Closed, ResolvedPublic

Description

Proposition

Adding new parameter to LintErrors query Api for limiting lint errors by article ID.
e.g.

api.php?action=query&prop=linterrors&pageid=12345

Background

For users, there are 6 ways to get lint errors information.

  1. action=info page
  2. Special:LintErrors index page
  3. Linterstats query Api
  4. Using lintid parameter
  5. Special:LintErrors table page for each lint error category
  6. LintErrors query Api

1, 2, and 3 only show counts of lint errors. They do not show lint ID and detailed information. To use 4, users need lint ID of the page beforehand.
By using 5 and 6, users can get detailed lint error information. However, 5 and 6 do not allow users to limit results by article. Thus, to get detailed lint errors information of a certain page, users need to look up lint errors of pages in its namespace. There are thousands or millions of lint errors ([https://en.wikipedia.org/wiki/Special:LintErrors]), so it is unfeasible to look up lint errors in a namespace to get lint errors of a specific page.

Use cases

Users know lint errors count in action=info page. However, users cannot get the detailed information of them. By using the proposed API, users can get the detailed information. Detailed lint errors information helps users to identify problems in wiki text of the article.
The proposed API parameter also helps implementing T177289: Show me the error even if I can't edit and T151362: Linter: Display lint errors for a single page.

Event Timeline

Change 393236 had a related patch set uploaded (by Legoktm; owner: MawaruNeko):
[mediawiki/extensions/Linter@master] Add pageid parameter to query API

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

Change 393236 merged by jenkins-bot:
[mediawiki/extensions/Linter@master] API: Allow querying linterrors by pageid

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