You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `Fixer::generateDiff()` method uses `shell_exec()` with the `diff` command to generate a file diff.
Using this command is slow, in particular on Windows.
This commit introduces a preliminary check in the test logic to see if a diff is even needed and skips generating the diff if no differences are expected.
I don't know whether and if so, how much this will make a difference for *nix users, but on Windows, it makes a significant difference when running the sniff tests.
A run of just the sniff tests without this fix takes > 1 minute (~01.03.701 last time I ran it).
With this fix, the run time of the sniff tests is brought down to ~8 seconds.
So let's call this a quality of life improvement for all devs which regularly need to run sniff tests for either PHPCS itself or for external standards which base their test suite on the PHPCS native test framework.
0 commit comments