MediaWiki extensions manual
Linter
Release status: stable
Implementation Special page
Description Expose and track lint errors
Author(s) Kunal Mehta (Legoktmtalk)
MediaWiki >= 1.40.0
Database changes Yes
Tables linter
License GNU General Public License 2.0 or later
Download
README
Help Help:Extension:Linter
Parameters
  • $wgLinterUseNamespaceColumnStage
  • $wgLinterCategories
  • $wgLinterStatsdSampleFactor
  • $wgLinterUserInterfaceTagAndTemplateStage
  • $wgLinterWriteTagAndTemplateColumnsStage
  • $wgLinterWriteNamespaceColumnStage
Hooks used
  • APIQuerySiteInfoGeneralInfo
  • BeforePageDisplay
  • InfoAction
  • LoadExtensionSchemaUpdates
  • ParserLogLinterData
  • RevisionFromEditComplete
  • WikiPageDeletionUpdates
Quarterly downloads 96 (Ranked 90th)
Public wikis using 884 (Ranked 294th)
Translate the Linter extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The Linter extension tracks lint errors from an external service. Currently the main use case is to track the errors identified by Parsoid and expose them to editors. Help for users wanting to fix errors is available at Help:Extension:Linter.

Installation

This extension requires linting enabled in Parsoid's configuration.
  • Download and place the file(s) in a directory called Linter in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'Linter' );
    
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters

In the $wgParsoidSettings section of your LocalSettings.php file, set

$wgParsoidSettings = [
    'linting' => true
];

API

Special:ApiHelp/query+linterrors Special:ApiHelp/query+linterstats

Linter categories

A list of linter categories is available in site info properties.

Bootstrap or reprocess all pages

Instead of running refreshLinks.php, it's possible to populate lint errors by querying parsoid directly. See phab:T161556#3184216 for an example script.

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.