From 3465bedc7f762ee043399bc462af00430aea5f49 Mon Sep 17 00:00:00 2001 From: yihong Date: Fri, 25 Jul 2025 17:54:38 +0800 Subject: [PATCH] fix: ignore target files in make fmt-check (#6560) * fix: ignore target files in make fmt-check Signed-off-by: yihong0618 * fix: address comments Signed-off-by: yihong0618 --------- Signed-off-by: yihong0618 --- scripts/check-super-imports.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/check-super-imports.py b/scripts/check-super-imports.py index 11e541d1db..5083e20c08 100644 --- a/scripts/check-super-imports.py +++ b/scripts/check-super-imports.py @@ -13,8 +13,8 @@ # limitations under the License. import os -import re from multiprocessing import Pool +from pathlib import Path def find_rust_files(directory): @@ -24,6 +24,10 @@ def find_rust_files(directory): if "test" in root.lower(): continue + # Skip the target directory + if "target" in Path(root).parts: + continue + for file in files: # Skip files with "test" in the filename if "test" in file.lower():