Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/378753 )
Change subject: Add multi-colon-escape linter medium-priority category ...................................................................... Add multi-colon-escape linter medium-priority category Change-Id: I9f21f3128b78e7b2459c18a9121605dffd5a1bc4 --- M extension.json M i18n/en.json M i18n/qqq.json M includes/CategoryManager.php M includes/LintErrorsPager.php 5 files changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Linter refs/changes/53/378753/1 diff --git a/extension.json b/extension.json index 11364b9..a8275ac 100644 --- a/extension.json +++ b/extension.json @@ -107,6 +107,10 @@ "enabled": true, "priority": "high", "parser-migration": true + }, + "multi-colon-escape": { + "enabled": true, + "priority": "medium" } }, "LinterSubmitterWhitelist": { diff --git a/i18n/en.json b/i18n/en.json index c92cb3a..542d2dd 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -13,6 +13,7 @@ "linter-pager-obsolete-tag-details": "Obsolete HTML tag", "linter-pager-bogus-image-options-details": "Bogus file option", "linter-pager-missing-end-tag-details": "Missing end tag", + "linter-pager-multi-colon-escape-details": "Multi colon escape", "linter-pager-stripped-tag-details": "Stripped tag", "linter-pager-self-closed-tag-details": "Self-closed tag", "linter-pager-deletable-table-tag-details": "Table tag that should be deleted", @@ -27,6 +28,8 @@ "linter-category-bogus-image-options-desc": "These pages have files with bogus options.", "linter-category-missing-end-tag": "Missing end tag", "linter-category-missing-end-tag-desc": "These pages have missing end tags.", + "linter-category-multi-colon-escape": "Multi colon escape", + "linter-category-multi-colon-escape-desc": "These pages have links prefixed with multiple colons.", "linter-category-stripped-tag": "Stripped tags", "linter-category-stripped-tag-desc": "These pages have stripped tags.", "linter-category-self-closed-tag": "Self-closed tags", diff --git a/i18n/qqq.json b/i18n/qqq.json index c3f7a71..a06715f 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -17,6 +17,7 @@ "linter-pager-obsolete-tag-details": "Table column heading", "linter-pager-bogus-image-options-details": "Table column heading", "linter-pager-missing-end-tag-details": "Table column heading", + "linter-pager-multi-colon-escape-details": "Table column heading", "linter-pager-stripped-tag-details": "Table column heading", "linter-pager-self-closed-tag-details": "Table column heading", "linter-pager-deletable-table-tag-details": "Table column heading", @@ -31,6 +32,8 @@ "linter-category-bogus-image-options-desc": "Description of category", "linter-category-missing-end-tag": "Name of lint error category. See [[:mw:Help:Extension:Linter/missing-end-tag]]", "linter-category-missing-end-tag-desc": "Description of category", + "linter-category-multi-colon-escape": "Name of lint error category. See [[:mw:Help:Extension:Linter/multi-colon-escape]]", + "linter-category-multi-colon-escape-desc": "Description of category", "linter-category-stripped-tag": "Name of lint error category. See [[:mw:Help:Extension:Linter/stripped-tag]]", "linter-category-stripped-tag-desc": "Description of category", "linter-category-self-closed-tag": "Name of lint error category. See [[:mw:Help:Extension:Linter/self-closed-tag]]", diff --git a/includes/CategoryManager.php b/includes/CategoryManager.php index f3692a5..23527c7 100644 --- a/includes/CategoryManager.php +++ b/includes/CategoryManager.php @@ -45,7 +45,8 @@ 'deletable-table-tag' => 7, 'misnested-tag' => 8, 'pwrap-bug-workaround' => 9, - 'tidy-whitespace-bug' => 10 + 'tidy-whitespace-bug' => 10, + 'multi-colon-escape' => 11, ]; /** diff --git a/includes/LintErrorsPager.php b/includes/LintErrorsPager.php index 068ef94..dbf206f 100644 --- a/includes/LintErrorsPager.php +++ b/includes/LintErrorsPager.php @@ -160,6 +160,9 @@ isset( $lintError->params['sibling'] ) ) { return Html::element( 'code', [], $lintError->params['node'] . " + " . $lintError->params['sibling'] ); + } elseif ( $this->category === 'multi-colon-escape' && + isset( $lintError->params['href'] ) ) { + return Html::element( 'code', [], $lintError->params['href'] ); } return ''; case 'template': -- To view, visit https://gerrit.wikimedia.org/r/378753 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f21f3128b78e7b2459c18a9121605dffd5a1bc4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Linter Gerrit-Branch: master Gerrit-Owner: Arlolra <abrea...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits