Skip to content

Conversation

@samsonasik
Copy link
Member

Fixes rectorphp/rector#9487

@indykoning @TomasVotruba this should can cover rectorphp/rector#9487

this may need verification for counting increment for parallel process tho :)

@samsonasik
Copy link
Member Author

It seems cause invalid result on end to end test, I will check more :)

@samsonasik samsonasik marked this pull request as draft November 11, 2025 04:44
@samsonasik samsonasik marked this pull request as ready for review November 11, 2025 08:41
@samsonasik
Copy link
Member Author

All checks have passed 🎉 I will add e2e test for it :)

@samsonasik
Copy link
Member Author

I've added e2e test for it, it shows files changed without show the diff on --no-diffs, on verify locally, it shows 2 status:

➜  rector-src git:(handle-no-diffs) ✗ bin/rector process src/ChangesReporting/Output/ConsoleOutputFormatter.php --no-diffs --dry-run
 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%                                                                                                                        
 [OK] 1 file would have been changed (dry-run) by Rector                                                                
                                                                                                                        
 ➜  rector-src git:(handle-no-diffs) ✗ echo $?
2

which 2 is ExitCode::CHANGED_CODE 👍

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@TomasVotruba TomasVotruba merged commit 1a19a34 into main Nov 11, 2025
54 checks passed
@TomasVotruba TomasVotruba deleted the handle-no-diffs branch November 11, 2025 11:22
@TomasVotruba
Copy link
Member

Thank you 😇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dry run combined with no diffs always exits with success code

3 participants