Skip to content

Count skip-matched files in blink run summary - #198

Merged
TomasVotruba merged 2 commits into
mainfrom
fix-blink-file-count-parity
Oct 10, 2026
Merged

TomasVotruba merged 2 commits into
mainfrom
fix-blink-file-count-parity

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Problem

ecs check --blink on rector-src reported // 2652 files, while the PHP engine reported // 3305 files for the same config.

Cause

ECS counts every .php file discovered in the configured paths in its run summary, including files matched by a path skip (*/Fixture/*, */Source/*, …); it simply applies no rules to the skipped ones. blink dropped skip-matched files in the finder, so they never reached the summary and the count came out lower on any project with path skips.

To confirm this is purely a counting-semantics difference: the set of files blink actually checks already matches ECS exactly (the 2652 non-skipped files), and the parity harness, which diffs fixed trees, was unaffected.

Fix

finder.Find now returns the pre-skip discovered total alongside the files to process. The run summary reports the discovered total (matching ECS); only the non-skipped files are checked, as before.

After the fix, blink on rector-src reports // 3305 files, matching the PHP engine.

ECS counts every discovered .php file in its run summary, skip-matched ones included, then applies no rules to them. blink counted only the files it processed, so its summary was lower than ECS's on projects with path skips (e.g. 2652 vs 3305 on rector-src). Finder now reports the pre-skip discovered total alongside the files to process; the summary uses it while only the non-skipped files are checked.
filepath.Join produces backslash paths on Windows, so the forward-slash skip glob did not match there. Use filepath.FromSlash so the pattern matches the walked paths on every OS.
@TomasVotruba
TomasVotruba merged commit 8de3454 into main Oct 10, 2026
21 checks passed
@TomasVotruba
TomasVotruba deleted the fix-blink-file-count-parity branch October 10, 2026 09:40
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.

1 participant