From 8174d166d23c4249370e3d261723ca6f9e949b9d Mon Sep 17 00:00:00 2001 From: Yasser-Ameur Date: Wed, 9 Sep 2026 01:17:30 +0200 Subject: [PATCH] ci: normalize paths before the style ignore-file check 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. --- ci/style.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/style.py b/ci/style.py index ca3afa2bdf2f..18731281190b 100755 --- a/ci/style.py +++ b/ci/style.py @@ -26,7 +26,7 @@ def main(): fmt_files.extend(iglob(f"{dir}/**/*.rs", recursive=True)) for file in fmt_files: - if file in IGNORE_FILES: + if Path(file).as_posix() in IGNORE_FILES: continue fmt_one(Path(file), check_only)