Merge "Add multi-colon-escape linter medium-priority category"

This commit is contained in:
jenkins-bot 2017-09-22 20:52:23 +00:00 committed by Gerrit Code Review
commit f263b525ce
5 changed files with 15 additions and 1 deletions

View file

@ -107,6 +107,10 @@
"enabled": true,
"priority": "high",
"parser-migration": true
},
"multi-colon-escape": {
"enabled": true,
"priority": "medium"
}
},
"LinterSubmitterWhitelist": {

View file

@ -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",

View file

@ -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]]",

View file

@ -45,7 +45,8 @@ class CategoryManager {
'deletable-table-tag' => 7,
'misnested-tag' => 8,
'pwrap-bug-workaround' => 9,
'tidy-whitespace-bug' => 10
'tidy-whitespace-bug' => 10,
'multi-colon-escape' => 11,
];
/**

View file

@ -160,6 +160,9 @@ class LintErrorsPager extends TablePager {
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':