Rule dependent on another rule #7269
-
Is there a possibility to define that in order to run Rector rule |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, by nature of abstract syntax tree, this is not possible. If you traverse class, the class Rector will get exectued before method Rector. Design your rules to handle the least common node at once. |
Beta Was this translation helpful? Give feedback.
-
Hi @TomasVotruba , |
Beta Was this translation helpful? Give feedback.
Hi, by nature of abstract syntax tree, this is not possible. If you traverse class, the class Rector will get exectued before method Rector.
The rules have to be idempotent, not depending on each other.
Design your rules to handle the least common node at once.