diff --git a/check.sh b/check.sh index 380bf8c..aa98cd5 100644 --- a/check.sh +++ b/check.sh @@ -372,7 +372,7 @@ bad_imp = [m for m in re.findall(r"^\s*(?:import|from)\s+([A-Za-z_][\w.]*)", too ("sys", "re", "math", "json", "os", "argparse", "collections", "itertools", "functools", "pathlib")] report("F33", bool(tool) and not bad_nums and not bad_imp, "tools/extract_from_dxf.py 있음, 도면 좌표·정답 숫자·외부 라이브러리 없음" + (f" — 숫자: {bad_nums}" if bad_nums else "") + (f" — import: {bad_imp}" if bad_imp else "")) -TMP = tempfile.gettempdir() +TMP = tempfile.mkdtemp(prefix="d3w_") # 실행마다 따로 — 여러 폴더에서 동시에 검사해도 임시 파일이 섞이지 않게 EX, err = (run_extract(DXF, os.path.join(TMP, "d3w_ex.js")) if have_dxf else (None, "private/drawing.dxf 없음")) ex_parts = EX.get("parts", []) if isinstance(EX, dict) else [] ek = lambda k_: [p for p in ex_parts if isinstance(p, dict) and p.get("kind") == k_] @@ -1114,6 +1114,7 @@ for cp in ichecks: check(False, f"{cp} 실행 오류: {type(e).__name__}: {e}") print(f"이슈 검사 파일 {len(ichecks)}개" + (f": {', '.join(os.path.basename(p) for p in ichecks)}" if ichecks else "")) +shutil.rmtree(TMP, ignore_errors=True) print(f"결과: PASS {count['PASS']} / FAIL {count['FAIL']} / SKIP {count['SKIP']} (검사 범위 F01~{upto})") sys.exit(0 if count["FAIL"] == 0 else 1) PY