Расширение:Linter
![]() Статус релиза: стабильно |
|
---|---|
![]() |
|
Реализация | Служебная страница |
Описание | Обнаружение и отслеживание ошибок исходного кода. |
Автор(ы) | Kunal Mehta (Legoktmобсуждение) |
MediaWiki | >= 1.38.0 |
Изменения в БД | Да |
Таблицы | linter |
Лицензия | GNU General Public License 2.0 или позднее |
Скачать | README |
Помощь | Help:Extension:Linter/ru |
|
|
Quarterly downloads | 87 (Ranked 92nd) |
Public wikis using | 1,008 (Ranked 251st) |
Переведите расширение Linter, если оно доступно на translatewiki.net | |
Проблемы | Открытые задачи · Сообщить об ошибке |
Расширение Linter отслеживает ошибки lint с использованием внешней службы. В настоящее время основным применением служит отслеживание ошибок, обнаруживаемых Parsoid, и сообщение о них пользователям. Справка для пользователей, желающих исправлять ошибки, доступна на странице Help:Extension:Linter .
Установка
- Скачайте и распакуйте файл(ы) в папку с названием
Linter
в вашей папкеextensions/
. - Добавьте следующий код внизу вашего
LocalSettings.php
:wfLoadExtension( 'Linter' );
- Выполните скрипт обновления, который автоматически создаст необходимые таблицы, используемые расширением.
- Готово – Перейдите на страницу Special:Version на своей вики, чтобы удостовериться в том, что расширение успешно установлено.
Параметры конфигурации
In the $wgParsoidSettings section of your LocalSettings.php file, set
$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
- 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
- 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 allowed higher limits).
- lnttitle
Only include lint errors from the specified page title
- lntfrom
Lint ID to start querying from
- Type: integer
- 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
- Get number of lint errors in each category
- api.php?action=query&meta=linterstats [open in sandbox]
action=record-lint
- This module is internal or unstable. Its operation may change without notice.
- This module requires read rights.
- Source: Linter
- License: GPL-2.0-or-later
Record a lint error in the database
- data
JSON encoded data about the error
- This parameter is required.
- page
Page title
- This parameter is required.
- revision
Revision ID that the error was found in
- This parameter is required.
- Type: integer
Категории линтера
Список категорий доступен в информации о сайте.
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, чтобы узнать, где оно установлено. Полный список расширений, установленных на конкретной вики, можно увидеть на странице Special:Version wiki. |
Это расширение включено в следующие пакеты и/или вики-фермы: This is not an authoritative list. Some wiki farms/hosts may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |