Skip to content

[DX] Make withSkip() report rules that are ignored, but never registered #8657

@TomasVotruba

Description

@TomasVotruba

Some rules that were parts of sets before can be excluded. E.g. json throw error rule, that made all json functions fail, or literal separator that changed all integer numbers.

Still those rules are ignored in withSkip() methods, ref https://x.com/hackbard/status/1792988835267150104
In some cases, it can be 10+ ignored that are not really needed. The Rector config should be small and with meaning lines.

The withSkip() method should be smart enough to go through registered rules + sets, and compare to report those rules:

->withSkip([
    JsonThrowOnErrorRector::class,
]);

[Note] The rule  JsonThrowOnErrorRector is ignored, but its actually never registered. You can remove it from the withSkip([...]) method

Note: it should also report rector classes that no longer exist (class_exists(...) === false)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions