Skip to content

ci: normalize paths before the style ignore-file check - #5519

Open
Yasser-Ameur wants to merge 1 commit into
rust-lang:mainfrom
Yasser-Ameur:fix/style-ignore-files-windows-path-sep
Open

ci: normalize paths before the style ignore-file check#5519
Yasser-Ameur wants to merge 1 commit into
rust-lang:mainfrom
Yasser-Ameur:fix/style-ignore-files-windows-path-sep

Conversation

@Yasser-Ameur

@Yasser-Ameur Yasser-Ameur commented Sep 8, 2026

Copy link
Copy Markdown

ci/style.py cannot run on Windows. glob returns src\macros.rs and
IGNORE_FILES holds src/macros.rs, so the file it means to skip is formatted
anyway and rustfmt fails it on width.

as_posix() before the comparison. Nothing changes where paths already use
forward slashes.

libc-0.2 carries the same line.

@rustbot label +stable-nominated

@rustbot rustbot added A-CI Area: CI-related items stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Sep 8, 2026

@tgross35 tgross35 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please handwrite all communication like descriptions and commit messages

View changes since this review

@rustbot

rustbot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@Yasser-Ameur
Yasser-Ameur marked this pull request as ready for review September 8, 2026 23:48
glob returns `src\macros.rs` on Windows while `IGNORE_FILES` holds
`src/macros.rs`, so the file the script means to skip was formatted anyway and
rustfmt failed it on width. Comparing `as_posix()` fixes it, and nothing changes
where paths already use forward slashes.
@Yasser-Ameur
Yasser-Ameur force-pushed the fix/style-ignore-files-windows-path-sep branch from f29d76d to 8174d16 Compare September 9, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: CI-related items S-waiting-on-author S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants