-
-
Notifications
You must be signed in to change notification settings - Fork 687
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
Additional (code standard?) rules are running by default #3222
Comments
@TomasVotruba Can you please help us? We are running Drupal Rector against 10,000 projects (Drupal modules), to help them upgrade their code to the upcoming Drupal 9. The Rector rules we implemented can already help 3,000 of these projects, as you can see in this list (rightmost column): But because Rector is running these additional code style rules, we cannot send the patches to all these projects that could benefit from it. Here's an example with a mix of expected Rector rules and unexpected code style rules - (same file uploaded to github) |
If you provide failing PR with minimal test case (1 file), it makes it much simpler to fix. |
Thank you.
Please let me know if there's a better way to provide test cases. |
I don't mean demo, but pull-request to code here. So continuous integration unit test are failing. |
@TomasVotruba Do you mean creating something similar to this PR? If yes, how do I know were it should be located? I don't know what rule is creating these changes and where might it be called from. |
Yes. The location is good question. We don't have such tests here AFAIK, just for particular @annotatoin. But I'd look somewhere in |
@shaal & @TomasVotruba, I created #3250 to try and start this process. The I may have time next week to look at this more. |
Bug Report
vendor/bin/rector --version
)Minimal PHP Code Causing Issue
In this example a docblock is being removed, because there's an empty docblock after it:
https://getrector.org/demo/9dbe8d1d-b062-4b16-97d2-605769834cbc#result
In this example empty comment lines are being removed, and 2 lines are being removed and added back the same way:
https://getrector.org/demo/0737a1e7-0b83-4e50-9e64-72f2e33476c8#result
Expected Behaviour
I'm expecting rector to run only the rules that are set in rector.yml, and if it's not explicitly called it shouldn't run.
The text was updated successfully, but these errors were encountered: