扩展:Linter
此扩展随附于MediaWiki 1.40及更高版本。 因此您无需另外下载。 但是,您仍需遵循提供的其他使用说明。
![]() 发行状态: 穩定版 |
|
---|---|
![]() |
|
实现 | 特殊页面 |
描述 | |
作者 | Kunal Mehta (Legoktm讨论) |
MediaWiki | >= 1.41 |
数据库更改 | 是 |
表 | linter |
许可协议 | GNU通用公眾授權條款2.0或更新版本 |
下載 | README |
帮助 | Help:Extension:Linter/zh |
|
|
季度下載量 | 83 (Ranked 88th) |
正在使用的公开wiki数 | 884 (Ranked 294th) |
前往translatewiki.net翻譯Linter扩展 | |
問題 | 开启的任务 · 报告错误 |
Linter扩展可以用一个外部服务追踪lint错误。 目前的主要用途是追踪由Parsoid发现的错误并报告给编者。 想要修复错误的用户可以查看帮助:扩展:Linter 的帮助。
安裝
此扩展需要在Parsoid的配置中启用linting。
- 下载文件,并将其放置在您
extensions/
文件夹中的Linter
目录内。 - 将下列代码放置在您的LocalSettings.php 的底部:
wfLoadExtension( 'Linter' );
- 运行更新脚本,它将自动创建此扩展必须依赖的数据库表。
完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。
配置参数
在你的LocalSettings.php文件的$wgParsoidSettings段落,设置
$wgParsoidSettings = [
'linting' => true
];
API
list=linterrors (lnt)
- This module requires read rights.
- Source: Linter
- License: GPL-2.0-or-later
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, 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|obsolete-tag|stripped-tag
- lntinvisible-categories
Invisible categories of lint errors
- Values (separate with | or alternative): large-tables, missing-end-tag-in-heading
- Default: large-tables|missing-end-tag-in-heading
- 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, 2300, 2301, 2302, 2303, 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)
- This module requires read rights.
- Source: Linter
- License: GPL-2.0-or-later
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]
Linter 分类
Linter分类的列表在网站信息属性。
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.
![]() | 此扩展用于一个或多个维基媒体项目。 这可能意味着扩展足够稳定、运作足够良好,可以用在这样的高流量的网站上。 请在维基媒体的CommonSettings.php和InitialiseSettings.php配置文件中查找此扩展的名称以查看哪些网站安装了该扩展。 特定wiki上的已安装的扩展的完整列表位于Special:Version页面。 |
![]() | 此扩展在以下wiki农场/托管网站和/或软件包中提供: 這不是一份權威名單。 即使某些wiki农场/托管网站和/或软件包未在这里列出,它们也可能提供此扩展。 请检查你的wiki农场/托管网站或软件包以确认提供情况。 |
Categories:
- Extensions bundled with MediaWiki 1.40/zh
- Stable extensions/zh
- Special page extensions/zh
- GPL licensed extensions/zh
- Extensions in Wikimedia version control/zh
- APIQuerySiteInfoGeneralInfo extensions/zh
- BeforePageDisplay extensions/zh
- InfoAction extensions/zh
- LoadExtensionSchemaUpdates extensions/zh
- ParserLogLinterData extensions/zh
- RevisionFromEditComplete extensions/zh
- WikiPageDeletionUpdates extensions/zh
- All extensions/zh
- Extensions used on Wikimedia/zh
- Extensions included in Canasta/zh
- Extensions included in Miraheze/zh
- Extensions included in WikiForge/zh
- Extensions included in WikiTide/zh