后端重写提交
This commit is contained in:
@@ -16,6 +16,7 @@ const TEXT_EXTENSIONS = new Set([
|
||||
'.mjs',
|
||||
'.ps1',
|
||||
'.py',
|
||||
'.rs',
|
||||
'.scss',
|
||||
'.sh',
|
||||
'.toml',
|
||||
@@ -40,12 +41,15 @@ const TEXT_FILENAMES = new Set([
|
||||
const EXCLUDED_PREFIXES = [
|
||||
'.codex-logs/',
|
||||
'.git/',
|
||||
'.codex-cargo-home-',
|
||||
'dist/',
|
||||
'dist_check/',
|
||||
'dist_check_monster_position/',
|
||||
'media/',
|
||||
'node_modules/',
|
||||
'public/Icons/',
|
||||
'server-rs-codex-',
|
||||
'server-rs/target-',
|
||||
];
|
||||
|
||||
const IGNORE_FILE = '.encoding-check-ignore';
|
||||
@@ -58,6 +62,7 @@ function normalizePath(filePath) {
|
||||
function shouldCheck(filePath) {
|
||||
const normalizedPath = normalizePath(filePath);
|
||||
|
||||
// 本地 cargo cache / verify copy 不属于主工程源码,避免把临时工作区扫进仓库级编码检查。
|
||||
if (EXCLUDED_PREFIXES.some((prefix) => normalizedPath.startsWith(prefix))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user