MCPcopy Create free account
hub / github.com/Silentely/eSIM-Tools / checkEnvExample

Function checkEnvExample

scripts/quality-check.js:80–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78}
79
80function checkEnvExample() {
81 const envPath = path.join(projectRoot, 'env.example');
82 const content = fs.readFileSync(envPath, 'utf8');
83 const issues = [];
84
85 // 检查必需变量
86 checks.envVarCheck.required.forEach(varName => {
87 if (!content.includes(`${varName}=`)) {
88 issues.push(`缺少必需环境变量: ${varName}`);
89 }
90 });
91
92 // 检查废弃变量
93 checks.envVarCheck.deprecated.forEach(varName => {
94 if (content.includes(`${varName}=`)) {
95 issues.push(`包含废弃环境变量: ${varName}`);
96 }
97 });
98
99 return issues;
100}
101
102function searchInFiles(pattern, files, excludeContext = []) {
103 const results = [];

Callers 1

runChecksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected