Wikipedia:WPCleanerNG/Configuration

icon WPCleaner – 2.05 (August 26, 2022 (2022-08-26)) [±]
icon WPCleaner

General information about WPCleaner

icon Discussion

Discuss the application

icon Typos

Suggestions for spelling and typography

icon FAQ

Frequently asked questions

icon Installation

Install instructions

Bug report or feature request · History of changes · Configuration (help, template) · Wikis · Languages · Users · Screenshots

WPCleanerNG reads its configuration from pages on the wiki when you log in. A modification of these pages is taken into account at the next login.

WPCleaner configuration

The general configuration is shared with WPCleaner:

Each parameter is written as name=value END, the value going up to the first END; it can span several lines.

Parameters used by WPCleanerNG:

ParameterUsageUser page
check_wiki_translation_pagePage containing the configuration of the Check Wikipedia errors (see below)No
check_wiki_project_pagePage of the Check Wikipedia project, used in the default summaryNo
check_wiki_commentSummary used when fixing Check Wikipedia errorsNo
close_self_closing_tagstrue (default) to suggest <br /> for incorrect <br> and <hr> tags (error 2), false to suggest <br>No
general_abbreviationsAbbreviations with their replacement, one per line: Abbreviation|Meaning|Replacement (the replacement may contain |); used by error 67 to suggest replacing an abbreviation followed by a referenceYes, added to the abbreviations of the wiki
general_anchor_templatesTemplates creating an anchor, one per line: Template|Parameter (parameter 1 by default); used by error 2 when its anchor_templates parameter is emptyYes, added to the templates of the wiki
general_apostrophe_templateTemplate to use for an apostrophe just before bold text, e.g. ' for {{'}}Yes, replaces the value of the wiki
general_template_groupsGroups of templates, one group per line: Group name|Template|Template|...; +Group includes another groupYes, added to the groups of the wiki

Check Wikipedia configuration

The page given by check_wiki_translation_page (on English Wikipedia, Wikipedia:WikiProject Check Wikipedia/Translation) uses the same format. Each setting of an error is written as error_NNN_setting_project=value END, for example error_048_prio_enwiki=3 END.

Settings used by WPCleanerNG:

These settings can be overridden on your own WPCleaner configuration page.

Configuration of each error

The parameters specific to an error are written on a dedicated page, Wikipedia:WPCleanerNG/Configuration/NNN where NNN is the error number with 3 digits (for example Wikipedia:WPCleanerNG/Configuration/048). On other wikis, the page has the same name in the project namespace (for example Wikipédia:WPCleanerNG/Configuration/048 on French Wikipedia).

The parameters are written in YAML in the first <syntaxhighlight lang="yaml"> block of the page. The rest of the page can contain any explanation.

<syntaxhighlight lang="yaml">
# Comments start with #
imagemap: true
ignore_templates:
  - Lang
ignore_groups:
  - CS1Templates
template_groups:
  Quotes: [Quote, Blockquote]
</syntaxhighlight>

Rules:

Parameters of each error:

ErrorParameterUsage
2anchor_templatesList of templates suggested to replace a self-closed <span id="…"/> (or div, cite), each given by a template field and an optional parameter field (1 by default); general_anchor_templates is used when empty
clear_allReplacement suggested for <br clear="all"> (automatic in articles)
clear_leftReplacement suggested for <br clear="left">
clear_rightReplacement suggested for <br clear="right">
3templatesList of templates producing the reference list: the error isn't reported when one of them is used; like Check Wikipedia, each entry is also a regular expression matched at the beginning of the template (first letter in any case)
references_templatesSame as templates, used only when templates is empty
ref_templatesList of templates producing a reference, like <ref>
insertText suggested to add the reference list (no insertion suggested without it)
titlesSection headings where the reference list can be added; the first one is the heading of a section added before before_titles, before_templates or the categories
before_titles / before_templatesSection headings / templates before which a section with the reference list can be added
17ignore_templatesList of templates in which duplicate categories are ignored, each given by a template field
ignore_parametersList of template parameters in which duplicate categories are ignored, each given by a template field and a parameters field (list of parameter names, or numbers for unnamed parameters)
48imagemaptrue to report the links inside <imagemap> tags (the whole line is reported, to be deleted), false (default) to ignore them
ignore_templatesList of templates in which the links are ignored
ignore_groupsList of groups of templates in which the links are ignored
template_groupsGroups of templates, in addition to general_template_groups: each group name is followed by its list of templates
61templatesList of templates used like references, reported like <ref> tags
separatorText written between consecutive references (empty by default)
force_separatortrue to remove automatically a punctuation between consecutive references, false (default) to suggest it only
67abbreviationsList of abbreviations not reported before a reference (write them between quotes)
safe_templatesList of template parameters in which the punctuation can be moved automatically after the reference, each given by a template field and a parameters field (list of parameter names, or numbers for unnamed parameters)
separatorText written between consecutive references (empty by default)
90link_templatesList of templates displaying an external link, each given by a template field and the url and text fields (names of its parameters): the whole template is replaced by an internal link
history_templatesList of templates suggested for links to the history of an article, each given by a template field and the article and text fields (names or numbers of its parameters)
oldid_templatesList of templates suggested for links to an old version of an article, each given by a template field and the article, oldid and text fields
prefix_index_templatesList of templates suggested for links to Special:PrefixIndex, each given by a template field and the article (prefix) and text fields
91link_templatesList of templates displaying an external link, each given by a template field and the url and text fields (names of its parameters): the whole template is replaced by an interwiki link
only_languagetrue (default) to report only links to wikis in other languages, false to report links to any other wiki
only_localtrue (default) to report only links to local interwikis (Wikimedia wikis), false to report links to any wiki