From 4d8893f607d1a59990487ee4336a90bfd0f1c669 Mon Sep 17 00:00:00 2001 From: aoright <102943475+aoright@users.noreply.github.com> Date: Wed, 19 Aug 2026 10:25:37 +0800 Subject: [PATCH] fix(ci): add tool cache directories to check-unicode-safety ignore list Signed-off-by: aoright <102943475+aoright@users.noreply.github.com> --- scripts/ci/check-unicode-safety.js | 4 ++++ tests/scripts/check-unicode-safety.test.js | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/scripts/ci/check-unicode-safety.js b/scripts/ci/check-unicode-safety.js index 96c9ba54e..faa1ea566 100644 --- a/scripts/ci/check-unicode-safety.js +++ b/scripts/ci/check-unicode-safety.js @@ -15,6 +15,10 @@ const ignoredDirs = new Set([ '.dmux', '.next', '.venv', + '.pytest_cache', + '.ruff_cache', + '.turbo', + '.cache', 'coverage', 'venv', ]); diff --git a/tests/scripts/check-unicode-safety.test.js b/tests/scripts/check-unicode-safety.test.js index 012d6586a..6831b8683 100644 --- a/tests/scripts/check-unicode-safety.test.js +++ b/tests/scripts/check-unicode-safety.test.js @@ -198,6 +198,24 @@ if ( passed++; else failed++; +if ( + test('skips tool cache directories (.pytest_cache, .ruff_cache, .turbo, .cache)', () => { + const root = makeTempRoot('ecc-unicode-cache-'); + for (const cacheDir of ['.pytest_cache', '.ruff_cache', '.turbo', '.cache']) { + fs.mkdirSync(path.join(root, cacheDir), { recursive: true }); + fs.writeFileSync( + path.join(root, cacheDir, 'cache-data.json'), + `{"cached": "${rocketEmoji}"}\n` + ); + } + + const result = runCheck(root); + assert.strictEqual(result.status, 0, result.stdout + result.stderr); + }) +) + passed++; +else failed++; + console.log(`\nPassed: ${passed}`); console.log(`Failed: ${failed}`); process.exit(failed > 0 ? 1 : 0);