Add pwrap-bug-workaround linter category

Change-Id: If1ec022e5bb741f4dc825428b5a689c2f0b0c445
This commit is contained in:
Subramanya Sastry 2017-04-12 16:27:41 -05:00
parent a5e2f822f3
commit a866fa7c76
5 changed files with 16 additions and 0 deletions

View file

@ -88,6 +88,10 @@
"misnested-tag": {
"severity": "warning",
"enabled": true
},
"pwrap-bug-workaround": {
"severity": "warning",
"enabled": true
}
},
"LinterSubmitterWhitelist": {

View file

@ -17,6 +17,7 @@
"linter-pager-self-closed-tag-details": "Self-closed tag",
"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-category-fostered": "Fostered content",
"linter-category-fostered-desc": "These pages have fostered content.",
"linter-category-obsolete-tag": "Obsolete HTML tags",
@ -33,6 +34,8 @@
"linter-category-deletable-table-tag-desc": "These pages have table tags that should be deleted.",
"linter-category-misnested-tag": "Misnested tags",
"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-numerrors": "($1 {{PLURAL:$1|error|errors}})",
"linker-page-title-edit": "$1 ($2)",
"linker-page-edit": "edit",

View file

@ -19,6 +19,7 @@
"linter-pager-self-closed-tag-details": "Table column heading",
"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-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]]",
@ -35,6 +36,8 @@
"linter-category-deletable-table-tag-desc": "Description of category.",
"linter-category-misnested-tag": "Name of lint error category. See [[:mw:Help:Extension:Linter/misnested-tag]]",
"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-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}}",

View file

@ -43,6 +43,7 @@ class CategoryManager {
'self-closed-tag' => 6,
'deletable-table-tag' => 7,
'misnested-tag' => 8,
'pwrap-bug-workaround' => 9,
];
/**

View file

@ -134,6 +134,11 @@ class LintErrorsPager extends TablePager {
return Html::element( 'code', [], $in );
}, $lintError->params['items'] );
return $this->getLanguage()->commaList( $list );
} elseif ( $this->category === 'pwrap-bug-workaround' &&
isset( $lintError->params['root'] ) &&
isset( $lintError->params['child'] ) ) {
return Html::element( 'code', [],
$lintError->params['root'] . " > " . $lintError->params['child'] );
}
return '';
case 'template':