mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Linter
synced 2024-11-24 16:04:00 +00:00
Merge "Add multi-colon-escape linter medium-priority category"
This commit is contained in:
commit
f263b525ce
|
@ -107,6 +107,10 @@
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"priority": "high",
|
"priority": "high",
|
||||||
"parser-migration": true
|
"parser-migration": true
|
||||||
|
},
|
||||||
|
"multi-colon-escape": {
|
||||||
|
"enabled": true,
|
||||||
|
"priority": "medium"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"LinterSubmitterWhitelist": {
|
"LinterSubmitterWhitelist": {
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
"linter-pager-obsolete-tag-details": "Obsolete HTML tag",
|
"linter-pager-obsolete-tag-details": "Obsolete HTML tag",
|
||||||
"linter-pager-bogus-image-options-details": "Bogus file option",
|
"linter-pager-bogus-image-options-details": "Bogus file option",
|
||||||
"linter-pager-missing-end-tag-details": "Missing end tag",
|
"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-stripped-tag-details": "Stripped tag",
|
||||||
"linter-pager-self-closed-tag-details": "Self-closed tag",
|
"linter-pager-self-closed-tag-details": "Self-closed tag",
|
||||||
"linter-pager-deletable-table-tag-details": "Table tag that should be deleted",
|
"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-bogus-image-options-desc": "These pages have files with bogus options.",
|
||||||
"linter-category-missing-end-tag": "Missing end tag",
|
"linter-category-missing-end-tag": "Missing end tag",
|
||||||
"linter-category-missing-end-tag-desc": "These pages have missing end tags.",
|
"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": "Stripped tags",
|
||||||
"linter-category-stripped-tag-desc": "These pages have stripped tags.",
|
"linter-category-stripped-tag-desc": "These pages have stripped tags.",
|
||||||
"linter-category-self-closed-tag": "Self-closed tags",
|
"linter-category-self-closed-tag": "Self-closed tags",
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
"linter-pager-obsolete-tag-details": "Table column heading",
|
"linter-pager-obsolete-tag-details": "Table column heading",
|
||||||
"linter-pager-bogus-image-options-details": "Table column heading",
|
"linter-pager-bogus-image-options-details": "Table column heading",
|
||||||
"linter-pager-missing-end-tag-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-stripped-tag-details": "Table column heading",
|
||||||
"linter-pager-self-closed-tag-details": "Table column heading",
|
"linter-pager-self-closed-tag-details": "Table column heading",
|
||||||
"linter-pager-deletable-table-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-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": "Name of lint error category. See [[:mw:Help:Extension:Linter/missing-end-tag]]",
|
||||||
"linter-category-missing-end-tag-desc": "Description of category",
|
"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": "Name of lint error category. See [[:mw:Help:Extension:Linter/stripped-tag]]",
|
||||||
"linter-category-stripped-tag-desc": "Description of category",
|
"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]]",
|
"linter-category-self-closed-tag": "Name of lint error category. See [[:mw:Help:Extension:Linter/self-closed-tag]]",
|
||||||
|
|
|
@ -45,7 +45,8 @@ class CategoryManager {
|
||||||
'deletable-table-tag' => 7,
|
'deletable-table-tag' => 7,
|
||||||
'misnested-tag' => 8,
|
'misnested-tag' => 8,
|
||||||
'pwrap-bug-workaround' => 9,
|
'pwrap-bug-workaround' => 9,
|
||||||
'tidy-whitespace-bug' => 10
|
'tidy-whitespace-bug' => 10,
|
||||||
|
'multi-colon-escape' => 11,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -160,6 +160,9 @@ class LintErrorsPager extends TablePager {
|
||||||
isset( $lintError->params['sibling'] ) ) {
|
isset( $lintError->params['sibling'] ) ) {
|
||||||
return Html::element( 'code', [],
|
return Html::element( 'code', [],
|
||||||
$lintError->params['node'] . " + " . $lintError->params['sibling'] );
|
$lintError->params['node'] . " + " . $lintError->params['sibling'] );
|
||||||
|
} elseif ( $this->category === 'multi-colon-escape' &&
|
||||||
|
isset( $lintError->params['href'] ) ) {
|
||||||
|
return Html::element( 'code', [], $lintError->params['href'] );
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
case 'template':
|
case 'template':
|
||||||
|
|
Loading…
Reference in a new issue