-
-
Notifications
You must be signed in to change notification settings - Fork 416
[experimental] Add --kaizen option to apply only first X rules at a time #6876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
342a3b4 to
e7a625d
Compare
3f68321 to
0d1d4f7
Compare
|
Please correct me if I understood badly the implementation but if I understand correctly the usage of the kaizen option will be to run then then and so on. If the first 10 rules don't make any change, I would have run 10 times for nothing, until do some change that I can review. That could do the job, but what I had in mind had some extra-automation. Like just running and rector does:
Then I can commit the changes or ignore the rule and run again the
This way I'm saving rector runs. |
|
It's a bit different. It should apply at least first X rules, where X is So if we run: vendor/bin/rector --kaizen 2It will apply first 2 rules that change anything. If there are no changes, it means all sets and rules are applied and |
|
Ok, so basically my usage would be to run and commiting changes (or ignoring the rule) between every run until a run cannot change anything and it means |
|
Exactly 👍 If you feel like you want to progress faster, e.g. when codebase is stable, |
|
Let's ship this to test in the wild 👍 |
|
@TomasVotruba @samsonasik @VincentLanglet I am testing it, and it seems not work |
|
@shakaran it seems using -vendor/bin/rector --kaizen 5
+vendor/bin/rector --kaizen=5 |
|
@shakaran I created new PR to handle it: |




Not ready for review yet, WIP