Subramanya Sastry has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/396105 )
Change subject: WIP: Create new high priority linter categories
......................................................................
WIP: Create new high priority linter categories
* Some things need to be clarified on the Parsoid end about whether
we want multiple categories or if a catch-all category is okay.
Change-Id: If21a22b7f1d8d582c92af13d60261c97502fbe48
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/CategoryManager.php
M includes/LintErrorsPager.php
5 files changed, 29 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Linter
refs/changes/05/396105/1
diff --git a/extension.json b/extension.json
index 566ef08..b48f927 100644
--- a/extension.json
+++ b/extension.json
@@ -121,6 +121,16 @@
"enabled": true,
"priority": "high",
"parser-migration": true
+ },
+ "multiple-unclosed-formatting-tags": {
+ "enabled": true,
+ "priority": "high",
+ "parser-migration": true
+ },
+ "misc-tidy-replacement-issues": {
+ "enabled": true,
+ "priority": "high",
+ "parser-migration": true
}
},
"LinterSubmitterWhitelist": {
diff --git a/i18n/en.json b/i18n/en.json
index 2c0909f..a9e2a3b 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -22,6 +22,8 @@
"linter-pager-tidy-whitespace-bug-details": "Tidy whitespace bug",
"linter-pager-html5-misnesting-details": "Misnesting in HTML5 (but not
in Tidy)",
"linter-pager-tidy-font-bug-details": "Font tag changes link color in
Tidy but won't in HTML5",
+ "linter-pager-multiple-unclosed-formatting-tags": "Multiple unclosed
small/big tags on the page",
+ "linter-pager-misc-tidy-replacement-issues": "Miscellaneous markup
errors affecting Tidy replacement",
"linter-category-fostered": "Fostered content",
"linter-category-fostered-desc": "These pages have fostered content.",
"linter-category-obsolete-tag": "Obsolete HTML tags",
@@ -48,6 +50,10 @@
"linter-category-html5-misnesting-desc": "These misnested tags will
behave differently in HTML5 compared to HTML4.",
"linter-category-tidy-font-bug": "Tidy bug affecting font tags wrapping
links",
"linter-category-tidy-font-bug-desc": "Tidy moves these font tags
inside links to change link colour",
+ "linter-category-multiple-unclosed-formatting-tags": "Multiple unclosed
small/big tags",
+ "linter-category-multiple-unclosed-formatting-tags-desc": "These pages
have multiple unclosed small/big tags",
+ "linter-category-misc-tidy-replacement-issues": "Miscellaneous Tidy
replacement issues",
+ "linter-category-misc-tidy-replacement-issues-desc": "These pages have
other issues that affect rendering when Tidy is removed",
"linter-numerrors": "($1 {{PLURAL:$1|error|errors}})",
"linter-page-title-edit": "$1 ($2)",
"linter-page-edit": "edit",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 58212e4..5f2b44d 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -26,6 +26,8 @@
"linter-pager-tidy-whitespace-bug-details": "Table column heading.
\"Tidy\" is a name of a software package that transforms HTML files, so it
doesn't have to be translated. For information about the bug, see the commit
message https://gerrit.wikimedia.org/r/#/c/371068 .",
"linter-pager-html5-misnesting-details": "Table column heading.",
"linter-pager-tidy-font-bug-details": "Table column heading. Don't
translate \"font\".",
+ "linter-pager-multiple-unclosed-formatting-tags-details": "Table column
heading.",
+ "linter-pager-misc-tidy-replacement-issues-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]]",
@@ -52,6 +54,10 @@
"linter-category-html5-misnesting-desc": "Description of category",
"linter-category-tidy-font-bug": "Name of lint error category. See
[[:mw:Help:Extension:Linter/tidy-font-bug]]. Don't translate \"font\".",
"linter-category-tidy-font-bug-desc": "Description of category",
+ "linter-category-multiple-unclosed-formatting-tags": "Name of lint
error category. See
[[:mw:Help:Extension:Linter/multiple-unclosed-formatting-tags]]",
+ "linter-category-multiple-unclosed-formatting-tags-desc": "Description
of category.",
+ "linter-category-misc-tidy-replacement-issues": "Name of lint error
category. See [[:mw:Help:Extension:Linter/misc-tidy-replacement-issues]]",
+ "linter-category-misc-tidy-replacement-issues-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}}",
"linter-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|linter-page-edit}} and {{msg-mw|linter-page-history}}",
"linter-page-edit": "Link text for edit link in
{{msg-mw|linter-page-title-edit}}\n{{Identical|Edit}}",
diff --git a/includes/CategoryManager.php b/includes/CategoryManager.php
index 7bfa295..06c5815 100644
--- a/includes/CategoryManager.php
+++ b/includes/CategoryManager.php
@@ -49,6 +49,8 @@
'multi-colon-escape' => 11,
'html5-misnesting' => 12,
'tidy-font-bug' => 13,
+ 'multiple-unclosed-formatting-tags' => 14,
+ 'misc-tidy-replacement-issues' => 15,
];
/**
diff --git a/includes/LintErrorsPager.php b/includes/LintErrorsPager.php
index 8b57f16..fa72f49 100644
--- a/includes/LintErrorsPager.php
+++ b/includes/LintErrorsPager.php
@@ -146,6 +146,7 @@
'stripped-tag',
'html5-misnesting',
'tidy-font-bug',
+ 'multiple-unclosed-formatting-tags',
];
if ( in_array( $this->category, $hasNameCats )
&& isset( $lintError->params['name'] ) ) {
return Html::element( 'code', [],
$lintError->params['name'] );
@@ -167,7 +168,10 @@
} elseif ( $this->category ===
'multi-colon-escape' &&
isset( $lintError->params['href'] ) ) {
return Html::element( 'code', [],
$lintError->params['href'] );
- }
+ } elseif ( $this-> category ===
'misc-tidy-replacement-issues' ) { /* ancestor and name will be set */
+ return Html::element( 'code', [],
+ $lintError->params['ancestor']
. " > " . $lintError->params['name'] );
+ }
return '';
case 'template':
if ( !$lintError->templateInfo ) {
--
To view, visit https://gerrit.wikimedia.org/r/396105
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If21a22b7f1d8d582c92af13d60261c97502fbe48
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Linter
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits