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_defaultsortMagic word used to suggest a sort key (error 37), with or without the final colon, e.g. DEFAULTSORT:; DEFAULTSORT is used when the value isn't an alias of the magic wordYes, 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
6replacementsList of replacements of special characters in sort keys, also used by error 37, each given by a character field (a single character), a replacement field (characters allowed in sort keys only) and an optional word field (true to put the replacement between single spaces, false by default)
9ignore_templatesList of templates in which several categories on the same line are ignored, each given by a template field
ignore_parametersList of template parameters in which several categories on the same line are ignored, each given by a template field and a parameters field (list of parameter names, or numbers for unnamed parameters)
10templatesList of templates producing a page title: a link whose target contains only templates of this list (e.g. [[commons:Category:{{Wikidata|1=P373}}]]) is a false positive, its templates highlighted; template names only, without {{
16only_templatestrue to report control characters only inside templates (outermost ones), false (default) to report them in the whole page
use_XXfalse to ignore the control character whose hexadecimal code in upper case is XX (for example use_A0 for the non-breaking space), true (default) to report it
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)
28templatesList of templates that can replace the end of a table (|}), each one closing the last table opened before it; template names only, without {{ (a @@HasNewline@@ marker is ignored)
33templatesList of templates that can replace a <u> tag, the underlined text being given as the first parameter (e.g. {{Underline|text}}); template names only, without {{
37first_charactersNumber of characters at the beginning of the title (without its namespace) checked for special letters (5 by default)
templatesList of templates preventing the automatic fix (the {{DEFAULTSORT:…}} is only suggested when one of them is in the page)
46templatesList of templates producing a page title: a link whose target contains only templates of this list (e.g. [[commons:Category:{{Wikidata|1=P373}}]]) is a false positive, its templates highlighted; template names only, without {{
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
52ignore_templatesList of templates in which categories before the last heading are ignored, each given by a template field
ignore_parametersList of template parameters in which categories before the last heading are ignored, each given by a template field and a parameters field (list of parameter names, or numbers for unnamed parameters)
59templatesList of templates in which the line breaks at the end of a parameter value are ignored
60ignore_templatesList of templates whose parameters are not checked for unmatched closing brackets, each given by a template field
ignore_parametersList of template parameters not checked for unmatched closing brackets, each given by a template field and a parameters field (list of parameter names, or numbers for unnamed parameters)
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)
68templateList of templates suggested to replace a link to an article in another language, each given by a template field and the local_title, language, distant_title and text fields (names of its parameters), with an optional order field (list of parameter names, in the order they are written); write language: lang=en to omit the language parameter when it is its default value en
69use_templateList of templates used to fix automatically a link to ISBN followed by a number, each given by a template field and the parenthesis and small fields (true or false) telling the delimiters around the ISBN it is used for
70reasonExplanation added to the requests for help on an ISBN of wrong length (reason parameter of the help-needed templates, end of the help-needed comment), {0} being replaced by the length of the number
71reasonExplanation added to the requests for help on an ISBN with a misplaced X (reason parameter of the help-needed templates, end of the help-needed comment)
72reason_checksum, reason, reason_no_range, reason_reservedExplanations added to the requests for help on an ISBN-10 with a wrong checksum ({0} computed, {1} written; reason when reason_checksum is not set), outside any range or in a reserved range
73reason_checksum, reason, reason_no_range, reason_reservedExplanations added to the requests for help on an ISBN-13 with a wrong checksum ({0} computed, {1} written; reason when reason_checksum is not set), outside any range or in a reserved range
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
566replacementsList of replacements suggested for an abbreviation in <abbr> tags, each given by the fields value, automatic (true or false) and replacement
replacements_titleList of replacements suggested for an abbreviation with a given title, each given by the fields value, title, automatic and replacement
templatesList of templates suggested to replace an abbreviation, each given by a template field, the abbreviation and meaning fields (names or numbers of its parameters) and an optional default_meaning field