Extensión:Linter

This page is a translated version of the page Extension:Linter and the translation is 88% complete.
Outdated translations are marked like this.
This extension comes with MediaWiki 1.40 and above. Thus you do not have to download it again. However, you still need to follow the other instructions provided.
Manual de extensiones de MediaWiki
Linter
Estado de lanzamiento: estable
Implementación Página especial
Descripción Exponer y rastrear errores de lint
Autor(es) Kunal Mehta (Legoktmdiscusión)
MediaWiki >= 1.42
Cambios de la base de datos
Tablas linter
Licencia GNU Licencia Pública general 2.0 o posterior
Descarga
README
Ayuda Help:Extension:Linter/es
  • $wgLinterUseNamespaceColumnStage
  • $wgLinterCategories
  • $wgLinterStatsdSampleFactor
  • $wgLinterUserInterfaceTagAndTemplateStage
  • $wgLinterWriteTagAndTemplateColumnsStage
  • $wgLinterWriteNamespaceColumnStage
Descargas trimestrales 48 (Ranked 103rd)
Wikis públicos que lo utilizan 884 (Ranked 294th)
Traduce la extensión Linter si está disponible en translatewiki.net
Asuntos Tareas abiertas · Reportar un bug

La extensión Linter rastrea los errores de lint de un servicio externo. Actualmente, el caso de uso principal es rastrear los errores identificados por Parsoid y exponerlos a los editores. La ayuda para los usuarios que desean corregir errores está disponible por Ayuda:Extensión:Linter .

Instalación

Esta extensión requiere linting habilitado en la configuración de Parsoid.
  • Descarga y extrae los archivos en un directorio denominado «Linter» dentro de la carpeta extensions/.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Linter
  • Añade el siguiente código en la parte final de tu archivo LocalSettings.php :
    wfLoadExtension( 'Linter' );
    
  • Ejecuta la secuencia de actualización, que creará automáticamente las tablas de la base de datos que necesita esta extensión.
  •   Hecho – Navega a Special:Version en el wiki para verificar que la extensión se haya instalado correctamente.

Parámetros de configuración

Be warned that this config is not sufficient to get lints run or linter errors reported as of February 2024. There may be missing documentation.

En la sección $wgParsoidSettings de su archivo LocalSettings.php, configure

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


API

list=linterrors (lnt)

(main | query | linterrors)

Get a list of lint errors

Specific parameters:
Other general parameters are available.
lntcategories

Categories of lint errors

Values (separate with | or alternative): bogus-image-options, deletable-table-tag, fostered, html5-misnesting, misc-tidy-replacement-issues, misnested-tag, missing-end-tag, missing-end-tag-in-heading, multi-colon-escape, multiline-html-table-in-list, multiple-unclosed-formatting-tags, obsolete-tag, pwrap-bug-workaround, self-closed-tag, stripped-tag, tidy-font-bug, tidy-whitespace-bug, unclosed-quotes-in-heading, wikilink-in-extlink
Default: deletable-table-tag|html5-misnesting|misc-tidy-replacement-issues|multiline-html-table-in-list|multiple-unclosed-formatting-tags|pwrap-bug-workaround|self-closed-tag|tidy-font-bug|tidy-whitespace-bug|unclosed-quotes-in-heading|bogus-image-options|fostered|misnested-tag|multi-colon-escape|wikilink-in-extlink|missing-end-tag|missing-end-tag-in-heading|obsolete-tag|stripped-tag
lntinvisible-categories

Invisible categories of lint errors

Values (separate with | or alternative): large-tables, night-mode-unaware-background-color
Default: large-tables|night-mode-unaware-background-color
lntlimit

Number of results to query

Type: integer or max
The value must be between 1 and 500.
Default: 10
lntnamespace

Only include lint errors from the specified namespaces

Values (separate with | or alternative): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 90, 91, 92, 93, 100, 101, 102, 103, 104, 105, 106, 107, 486, 487, 710, 711, 828, 829, 1198, 1199, 2600, 5500, 5501
To specify all values, use *.
lntpageid

Only include lint errors from the specified page IDs

Type: list of integers
Separate values with | or alternative.
Maximum number of values is 50 (500 for clients that are allowed higher limits).
lnttitle

Only include lint errors from the specified page title

lntfrom

Lint ID to start querying from

Type: integer
Example:
Get all lint errors of the obsolete-tag category
api.php?action=query&list=linterrors&lntcategories=obsolete-tag [open in sandbox]

meta=linterstats (lntrst)

(main | query | linterstats)

Get number of lint errors in each category


Example:
Get number of lint errors in each category
api.php?action=query&meta=linterstats [open in sandbox]


Categorías de Linter

Una lista de categorías de linter está disponible en [propiedades de información del sitio de https://www.mediawiki.org/w/api.php?action=query&meta=siteinfo&siprop=general%7Cnamespaces%7Cnamespacealiases%7Cstatistics].

Arrancar o reprocesar todas las páginas

En lugar de ejecutar refreshLinks.php , es posible completar los errores de pelusa consultando directamente a parsoid. Véase phab:T161556#3184216 para un script de ejemplo.

Special pages