jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/371071 )

Change subject: Add tidy-whitespace-bug linter high-priority category
......................................................................


Add tidy-whitespace-bug linter high-priority category

Change-Id: I9c068c2c45b4cf9bb5612f41dfa63a606a7a679a
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/CategoryManager.php
M includes/LintErrorsPager.php
5 files changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified
  Jforrester: Looks good to me, but someone else must approve



diff --git a/extension.json b/extension.json
index 600ad10..df372e3 100644
--- a/extension.json
+++ b/extension.json
@@ -99,6 +99,10 @@
                        "pwrap-bug-workaround": {
                                "enabled": true,
                                "priority": "high"
+                       },
+                       "tidy-whitespace-bug": {
+                               "enabled": true,
+                               "priority": "high"
                        }
                },
                "LinterSubmitterWhitelist": {
diff --git a/i18n/en.json b/i18n/en.json
index 22a9f00..c92cb3a 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -18,6 +18,7 @@
        "linter-pager-deletable-table-tag-details": "Table tag that should be 
deleted",
        "linter-pager-misnested-tag-details": "Misnested tag which should be 
properly nested",
        "linter-pager-pwrap-bug-workaround-details": "Paragraph wrapping bug 
workaround",
+       "linter-pager-tidy-whitespace-bug-details": "Tidy whitespace bug",
        "linter-category-fostered": "Fostered content",
        "linter-category-fostered-desc": "These pages have fostered content.",
        "linter-category-obsolete-tag": "Obsolete HTML tags",
@@ -36,6 +37,8 @@
        "linter-category-misnested-tag-desc": "These pages have misnested tags 
that could be fixed.",
        "linter-category-pwrap-bug-workaround": "Paragraph wrapping bug 
workaround",
        "linter-category-pwrap-bug-workaround-desc": "These pages have a 
paragraph wrapping bug that could be worked around.",
+       "linter-category-tidy-whitespace-bug": "Tidy whitespace bug",
+       "linter-category-tidy-whitespace-bug-desc": "These pages trigger a tidy 
whitespace bug that should be worked around.",
        "linter-numerrors": "($1 {{PLURAL:$1|error|errors}})",
        "linker-page-title-edit": "$1 ($2)",
        "linker-page-edit": "edit",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index c5d028e..bb036cc 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -21,6 +21,7 @@
        "linter-pager-deletable-table-tag-details": "Table column heading",
        "linter-pager-misnested-tag-details": "Table column heading",
        "linter-pager-pwrap-bug-workaround-details": "Table column heading",
+       "linter-pager-tidy-whitespace-bug-details": "Table column heading",
        "linter-category-fostered": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/fostered]]",
        "linter-category-fostered-desc": "Description of category.",
        "linter-category-obsolete-tag": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/obsolete-tag]]",
@@ -39,6 +40,8 @@
        "linter-category-misnested-tag-desc": "Description of category.",
        "linter-category-pwrap-bug-workaround": "Name of lint error category. 
See [[:mw:Help:Extension:Linter/pwrap-bug-workaround]]",
        "linter-category-pwrap-bug-workaround-desc": "Description of category.",
+       "linter-category-tidy-whitespace-bug": "Name of lint error category. 
See [[:mw:Help:Extension:Linter/tidy-whitespace-bug]]",
+       "linter-category-tidy-whitespace-bug-desc": "Description of category.",
        "linter-numerrors": "Shown after a category link to indicate how many 
errors are in that category. $1 is the number of errors, and can be used for 
PLURAL.\n{{Identical|Error}}",
        "linker-page-title-edit": "Used in a table cell. $1 is a link to the 
page, $2 is pipe separated links to the edit and history pages, the link text 
is {{msg-mw|linker-page-edit}} and {{msg-mw|linker-page-history}}",
        "linker-page-edit": "Link text for edit link in 
{{msg-mw|linker-page-title-edit}}\n{{Identical|Edit}}",
diff --git a/includes/CategoryManager.php b/includes/CategoryManager.php
index 7eaeb8e..b9faaf4 100644
--- a/includes/CategoryManager.php
+++ b/includes/CategoryManager.php
@@ -45,6 +45,7 @@
                'deletable-table-tag' => 7,
                'misnested-tag' => 8,
                'pwrap-bug-workaround' => 9,
+               'tidy-whitespace-bug' => 10
        ];
 
        /**
diff --git a/includes/LintErrorsPager.php b/includes/LintErrorsPager.php
index 46875f4..c0c8688 100644
--- a/includes/LintErrorsPager.php
+++ b/includes/LintErrorsPager.php
@@ -138,6 +138,11 @@
                                        isset( $lintError->params['child'] ) ) {
                                        return Html::element( 'code', [],
                                                $lintError->params['root'] . " 
> " . $lintError->params['child'] );
+                               } elseif ( $this->category === 
'tidy-whitespace-bug' &&
+                                       isset( $lintError->params['node'] ) &&
+                                       isset( $lintError->params['sibling'] ) 
) {
+                                       return Html::element( 'code', [],
+                                               $lintError->params['node'] . " 
+ " . $lintError->params['sibling'] );
                                }
                                return '';
                        case 'template':

-- 
To view, visit https://gerrit.wikimedia.org/r/371071
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c068c2c45b4cf9bb5612f41dfa63a606a7a679a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Linter
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <ssas...@wikimedia.org>
Gerrit-Reviewer: Arlolra <abrea...@wikimedia.org>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: Subramanya Sastry <ssas...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to