mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Linter
synced 2024-11-27 17:20:12 +00:00
Remove ParserMigration association
Bug: T333179 Change-Id: Ifc6676c3f873aeb1655f3cb1b549a5dd55bc4d85
This commit is contained in:
parent
58c71a0136
commit
e978607d56
|
@ -104,15 +104,13 @@
|
|||
"dbid": 6,
|
||||
"enabled": true,
|
||||
"priority": "high",
|
||||
"has-name": true,
|
||||
"parser-migration": true
|
||||
"has-name": true
|
||||
},
|
||||
"deletable-table-tag": {
|
||||
"dbid": 7,
|
||||
"enabled": true,
|
||||
"priority": "high",
|
||||
"has-name": true,
|
||||
"parser-migration": true
|
||||
"has-name": true
|
||||
},
|
||||
"misnested-tag": {
|
||||
"dbid": 8,
|
||||
|
@ -123,14 +121,12 @@
|
|||
"pwrap-bug-workaround": {
|
||||
"dbid": 9,
|
||||
"enabled": true,
|
||||
"priority": "high",
|
||||
"parser-migration": true
|
||||
"priority": "high"
|
||||
},
|
||||
"tidy-whitespace-bug": {
|
||||
"dbid": 10,
|
||||
"enabled": true,
|
||||
"priority": "high",
|
||||
"parser-migration": true
|
||||
"priority": "high"
|
||||
},
|
||||
"multi-colon-escape": {
|
||||
"dbid": 11,
|
||||
|
@ -141,41 +137,35 @@
|
|||
"dbid": 12,
|
||||
"enabled": true,
|
||||
"priority": "high",
|
||||
"has-name": true,
|
||||
"parser-migration": true
|
||||
"has-name": true
|
||||
},
|
||||
"tidy-font-bug": {
|
||||
"dbid": 13,
|
||||
"enabled": true,
|
||||
"priority": "high",
|
||||
"has-name": true,
|
||||
"parser-migration": true
|
||||
"has-name": true
|
||||
},
|
||||
"multiple-unclosed-formatting-tags": {
|
||||
"dbid": 14,
|
||||
"enabled": true,
|
||||
"priority": "high",
|
||||
"has-name": true,
|
||||
"parser-migration": true
|
||||
"has-name": true
|
||||
},
|
||||
"unclosed-quotes-in-heading": {
|
||||
"dbid": 15,
|
||||
"enabled": true,
|
||||
"priority": "high",
|
||||
"has-name": true,
|
||||
"parser-migration": true
|
||||
"has-name": true
|
||||
},
|
||||
"multiline-html-table-in-list": {
|
||||
"dbid": 16,
|
||||
"enabled": true,
|
||||
"priority": "high",
|
||||
"parser-migration": true
|
||||
"priority": "high"
|
||||
},
|
||||
"misc-tidy-replacement-issues": {
|
||||
"dbid": 17,
|
||||
"enabled": true,
|
||||
"priority": "high",
|
||||
"parser-migration": true
|
||||
"priority": "high"
|
||||
},
|
||||
"wikilink-in-extlink": {
|
||||
"dbid": 18,
|
||||
|
|
|
@ -51,12 +51,6 @@ class CategoryManager {
|
|||
self::NONE => [],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var bool[]
|
||||
* @phan-var array<string,bool>
|
||||
*/
|
||||
private $parserMigrationCategories = [];
|
||||
|
||||
/**
|
||||
* @var bool[]
|
||||
* @phan-var array<string,bool>
|
||||
|
@ -77,9 +71,6 @@ class CategoryManager {
|
|||
if ( $info['enabled'] ) {
|
||||
$this->categories[$info['priority']][] = $name;
|
||||
}
|
||||
if ( $info['parser-migration'] ?? false ) {
|
||||
$this->parserMigrationCategories[$name] = true;
|
||||
}
|
||||
if ( $info['has-name'] ?? false ) {
|
||||
$this->hasNameParam[$name] = true;
|
||||
}
|
||||
|
@ -100,14 +91,6 @@ class CategoryManager {
|
|||
sort( $this->categories[self::NONE] );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public function needsParserMigrationEdit( $name ) {
|
||||
return isset( $this->parserMigrationCategories[$name] );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return bool
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
namespace MediaWiki\Linter;
|
||||
|
||||
use ExtensionRegistry;
|
||||
use Html;
|
||||
use IContextSource;
|
||||
use InvalidArgumentException;
|
||||
|
@ -53,11 +52,6 @@ class LintErrorsPager extends TablePager {
|
|||
*/
|
||||
private $linkRenderer;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $haveParserMigrationExt;
|
||||
|
||||
/**
|
||||
* @var int|null
|
||||
*/
|
||||
|
@ -118,7 +112,6 @@ class LintErrorsPager extends TablePager {
|
|||
$this->title = $title;
|
||||
$this->throughTemplate = $throughTemplate;
|
||||
$this->tag = $tag;
|
||||
$this->haveParserMigrationExt = ExtensionRegistry::getInstance()->isLoaded( 'ParserMigration' );
|
||||
parent::__construct( $context );
|
||||
}
|
||||
|
||||
|
@ -226,13 +219,6 @@ class LintErrorsPager extends TablePager {
|
|||
if ( !$lintError ) {
|
||||
return '';
|
||||
}
|
||||
if ( $this->haveParserMigrationExt &&
|
||||
$this->categoryManager->needsParserMigrationEdit( $category )
|
||||
) {
|
||||
$editAction = 'parsermigration-edit';
|
||||
} else {
|
||||
$editAction = 'edit';
|
||||
}
|
||||
|
||||
switch ( $name ) {
|
||||
case 'title':
|
||||
|
@ -245,7 +231,7 @@ class LintErrorsPager extends TablePager {
|
|||
$title,
|
||||
$this->msg( $editMsgKey )->text(),
|
||||
[],
|
||||
[ 'action' => $editAction, 'lintid' => $lintError->lintId, ]
|
||||
[ 'action' => 'edit', 'lintid' => $lintError->lintId, ]
|
||||
);
|
||||
|
||||
$historyLink = $this->linkRenderer->makeLink(
|
||||
|
|
Loading…
Reference in a new issue