Skip to content

Skip ignored files in check_diff#6794

Open
ytmimi wants to merge 2 commits intorust-lang:mainfrom
ytmimi:skip_ignored_files
Open

Skip ignored files in check_diff#6794
ytmimi wants to merge 2 commits intorust-lang:mainfrom
ytmimi:skip_ignored_files

Conversation

@ytmimi
Copy link
Contributor

@ytmimi ytmimi commented Feb 6, 2026

Implement skipping logic just like rustfmt does. rustfmt would ignore these files anyway so we can save some time and effort if we avoid shelling out to rustfmt if we know rustfmt is going to ignore these files anyway.

This saves a significant amount of time, especially for repositories like r-l/rust which ignore a lot of files.

Implement skipping logic just like rustfmt does. rustfmt would ignore
these files anyway so we can save some time and effort if we avoid
spawning a subprocess for files that we know rustfmt is going to ignore
anyway.

This saves a significant amount of time, especially for repositories
like r-l/rust which ignore a lot of files.
These repos are explicitly skipped by r-l/rust's `rustfmt.toml` so i'm
adding them to include them in the diff check.
@rustbot rustbot added A-CI Area: CI S-waiting-on-review Status: awaiting review from the assignee but also interested parties. labels Feb 6, 2026
@ytmimi
Copy link
Contributor Author

ytmimi commented Feb 6, 2026

Shaves off another few minutes even after adding two more repos to check:

Before:
Screenshot 2026-01-28 at 11 14 57 PM

After:
Screenshot 2026-02-05 at 10 04 48 PM

@jieyouxu jieyouxu self-requested a review February 6, 2026 08:04
@jieyouxu jieyouxu self-assigned this Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: CI S-waiting-on-review Status: awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants