// 基座影响审计:逐行验证本次换肤的改动是否「只改颜色」 // 做法:解析 git diff -U0,把每段 hunk 的「删除行」与「新增行」都做颜色归一化 // (#RRGGBB / rgb() / rgba() → 占位符),再比对两侧是否等价。 // 等价 = 纯换色;不等价 = 有非颜色改动,单独列出待人工判断。 // 用法: node _design-test/audit-color-only.js const { execSync } = require('child_process'); const ZF = 'e:/KF_7/ZhenOS-ZF'; const raw = execSync('git -c core.quotepath=false diff -U0 --no-color', { cwd: ZF, maxBuffer: 1 << 28, encoding: 'utf8' }); const CO = /#[0-9a-fA-F]{3,8}\b|rgba?\([^)]*\)|\bhsl\([^)]*\)/g; const norm = s => s.replace(CO, '@C@').replace(/\s+/g, ' ').trim(); const isComment = s => { const t = s.trim(); return t.startsWith('//') || t.startsWith('/*') || t.startsWith('*') || t.startsWith('